develooper Front page | perl.perl5.porters | Postings from March 2011

Re: Revising Perl's OO docs - a new OO tutorial

Thread Previous | Thread Next
From:
Sam Vilain
Date:
March 6, 2011 18:19
Subject:
Re: Revising Perl's OO docs - a new OO tutorial
Message ID:
4D7440B6.10805@vilain.net
On 07/03/11 11:12, Jesse Vincent wrote:
>>> I am disappointed that after all this time we have no consensus on how
>>> to say in Perl "Class X has attribute Y" when so many other languages
>>> have solutions that have freed their users' minds up to move on to
>>> higher-level problems.
>> +1
> I'd love to see proposals (soon) for how we might do this in the core
> for 5.16 or 5.18. I'm not promising I'll _accept_ one of them, but I'd
> love to see us actually discuss such a thing.

I'd say shipping Class::MOP would be a fair first step towards this,
with the dual-life caveat this implies.

However it might be much nicer to build the registry functionality of
Class::MOP into the interpreter, aligning with the Rakudo Perl 6
introspection API, such that the Class::MOP module that ships with Perl
5 is a compatibility API which accesses those registry functions.  My
understanding of the layering of Moose is that it should still be quite
happy with such an underlying Meta-meta-model.

As long as there is a basic and simplistic front-end to this system
shipped with Perl, then the OO tutorial can explain perl OO in terms of
that, and then redirect the user to CPAN for stuff which is more
complicated.

I could possibly come up with a more concrete proposal, correlating
individual Class::MOP API methods with their Rakudo equivalents, if
there is interest.

Sam

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About