On Mon, Mar 7, 2011 at 7:09 PM, Paul Johnson <paul@pjcj.net> wrote: > What is being discussed here is the "Uniform Access Principle". Its > purpose is specifically to ensure that encapsulation is *not* violated. > See http://en.wikipedia.org/wiki/Uniform_access_principle 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: > http://www.mail-archive.com/perl6-language@perl.org/msg09420.html > > 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*. -Chris * This is not an argument to core Moose, just a comment on what I like about it's tendencies.Thread Previous | Thread Next