Ovid
Ovid
> This question might or might not overlap with what happens with Moo or Moose extend a Cor based class. Will it work at all? Will Moose be able to...
The intent is to ensure that debugging is supported. Due to the dynamic nature of Perl, it will still be possible to use those same facilities for violating encapsulation in...
I much prefer the `my`-like solution. I would probably write it like this: ```perl class Example { method calculate_thing { field $cache; return $cache //= do { expensive code goes...
For duplicated fields in the same block: ```perl class Test1 { field $x; field $x; } ``` At minimum, that should be a "redefined" warning, but I think it might...
Also, this is the full list of `field` attributes suggested in the RFC: https://github.com/Ovid/Cor/blob/master/rfc/attributes.md I realize that not all will be implemented.
I wrote this: --- For duplicated fields in the same block: ```perl class Test1 { field $x; field $x; } ``` At minimum, that should be a "redefined" warning, but...
> Certainly I think those ones shouldn't be permitted - `:param`, or any of the others that create accessor methods. Some third-party attributes would be fine though - `:isa` for...
> But can you? How do you call `$metafield = $metaclass->get_field( $name )` if `$name` isn't unique? That's a thorny question. At first blush, I would suggest that it only...
> I also would forbid more than one class block with the same name. A package is just a namespace, so there's nothing Perl can do about it ... For...
> Thinking further about inheritable fields for subclassing, I think it can be done within the syntax, while still keeping a lexical-like model. The trick is to be explicit about...