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

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

Thread Previous | Thread Next
Chris Prather
March 7, 2011 16:39
Re: Revising Perl's OO docs - a new OO tutorial
Message ID:
On Mon, Mar 7, 2011 at 7:09 PM, Paul Johnson <> wrote:

> What is being discussed here is the "Uniform Access Principle".  Its
> purpose is specifically to ensure that encapsulation is *not* violated.
> See

Yes exactly. I hadn't seen this page before, or had forgotten about
it. It also falls out of Liskov, the Law of Demeter, and basically any
argument for strong encapsulation. This also clarifies where Ric was
going with the Ruby reference. I had not known it strongly protected
instance variables, thought I am unsurprised.

> Perl6 was going to support it, and I believe it now does:
> I would love to have a core OO system which supported this principle.

One of the reasons I like Moose is that it tries to make this easier
rather than harder for more than just attribute-slot access*.


* This is not an argument to core Moose, just a comment on what I like
about it's tendencies.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About