http://qs321.pair.com?node_id=11136749


in reply to Re^3: The Corinna RFC for getting modern OO into the Perl core is taking shape
in thread The Corinna RFC for getting modern OO into the Perl core is taking shape

Only supporting v1.2.3 triplet semantic versioning.

I wouldn't go as far as to call it a "gratuitous incompatibility" since there are no Corinna classes right now which would break because of this. But I agree with you that having decimals would be good: Semantic versioning can be an obstacle in early Corinna adoption. If I want to migrate an existing old-style OO class to Corinna while keeping the API, I would need to change from decimal to semantic - and, worse, users of the class might need to change their code, too.

It's the latter concerns that I consider to be incompatibilities. Corinna isn't coming onto a blank stage. It's part of Perl and has to interoperate with what's out there. Particularly if it ever is going to be able to subclass existing modules (which I don't believe is on the table for the MVP) it needs to support the versioning scheme that those modules use.

No native way to support read/write accessors.

I'm not sure what you're expecting here?

Yeah, I let myself confound the issue of immutability with read/write accessors using the same name. To be fair, the overview (which is what I had read most recently) takes the opportunity to take shots at both at about the same time, too.

But now I think I didn't read the RFC carefully enough, because it appears to be at odds with the Overview on the subject of :reader/:writer on attributes. The Overview says under Helper Attributes:

The writer creates a method called set_$name to avoid overloading the meaning of the method name, and will return the invocant. Setting :reader($name) and :writer($name) to the same $name would be an error.

Whereas the RFC section 6.2.3.3 says:

If you explicity (sic) set the name of the writer to the name of the slot, there will be a special case to allow ->method for reading and ->method($new_value) for writing

So it looks like that's been changed? Or am I missing something else?

– Aaron
Preliminary operational tests were inconclusive. (The damn thing blew up.)