At 4:39 PM -0700 10/4/02, Michael Lazzaro wrote:
>Under the principle of TMTOWTDI, perl allows public attributes
>within a class. However, you must explicitly declare an attribute
>to be public.
There won't be any direct access to attributes outside class methods
of the class that defines the attributes, unless Larry changes his
mind in a big way. (And, honestly, probably not even then) Instead
it'll all be accessed via lvalue methods. If an attribute is exposed
there's just an lvalue method created, if it's not exposed there
isn't.
Inside the class, we'll just cheat and smack straight into the slots
of the attribute array, and if you've inherited from a perl 6 class
we'll be doing Evil Things with that array and all, but that's an
internal matter. :) Though, of course, there's nothing to stop you
from using Introspection (A power so great, it can only be used for
good or evil!) to go peeking around, but that's another matter
entirely.
Don't forget that we'll potentially be inheriting from *non* perl
classes, at least non-perl-6 classes (and more if I manage to pull it
off), so there's a limit to how much knowledge we want to require of
the semantics that get exposed.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk