Cor - A proposal for core Perl OO

I've been working with Sawyer X and Stevan Little to try to bring OO into the Perl core. Most of this work is based on Stevan's work, with me trying to add a final "polish" layer to make it clean and still feel like Perl.

It's being called "Cor" to distinguish it from current OO systems.

This is an example:

You can read the full description of Cor here.

Feel free to comment on the proposal here or on the gist.

1 Comment

Who will have lazy attributes built into the core first? Raku or Perl? The race is on!

As for the syntax - please, please drop this Moose-ish fat arrow abuse. It does not construct proper Pair object like in Raku so essentially

has max_size => ( default => method { 20 } )

is pretty much the same as

has ( max_size => default ), method { 20 }

So I think that

has max_size => { default => method { 20 }, ... }

is more natural.

Leave a comment

About Ovid

user-pic Freelance Perl/Testing/Agile consultant and trainer. See for our services. If you have a problem with Perl, we will solve it for you. And don't forget to buy my book!