Carl asked: > * What do we mean when we say 'has @.a is readonly'? > What do we want it to mean?
Not sure about "we", but I want that to mean that nothing outside the class can alter any component of @.a, no matter how deeply nested that component may be. > * Are we fine with references from readonly attributes leaking out of the > class? > Should we be? No. No. > * What language components could be provided to put class implementors > on the right path so that their classes end up encapsulated by > default? Doing nothing should result in the safe behaviour (i.e. full encapsulation). You ought to have to explicitly request anything else. One of the *big* selling points of Perl 6 is the prospect of "OO done right". Leaky encapsulation ain't that. Damian