At 3:56 PM -0600 11/7/02, Garrett Goebel wrote:
Short(ish) answer:Dan Sugalski wrote:At 8:29 PM +0100 11/7/02, Leopold Toetsch wrote: >Michael Lazzaro wrote: >>On Thursday, November 7, 2002, at 06:36 AM, Austin Hastings wrote: >> >>>For 'bit', the key value is (eenie, meenie, ...) '1'. > >> From A2 we have: >> >>"Run-time properties really are associated with the object in >>question, which implies some amount of overhead. For that reason, >>intrinsic data types like C<int> and C<num> may or may not allow >>run-time properties. > >From E2: a C<int> will never have attributes or promote to an object.Attributes aren't properties.I thought: 'attributes' :Perl5 == 'properites' isa Perl6 Can someone point me to Perl6 definitions for both terms?
perl 6 attributes are much like the hash entries in a perl 5 object (assuming you use a hash as your object), only the keys are fixed at class definition time, and each parent/child/grandchild class can only see its own slots in the objects. And slot names don't collide, so every class in a 47-class inheritance chain can have an attribute "Foo".
perl 6 properties are more on the order of runtime notations on a variable. (Damian likes the properties-as-PostIt-note metaphor. As do I, come to think of it)
Properties will be global to a variable, and queryable at runtime. Attributes are class-specific for a variable (okay, class instance specific, if you do Evil Things with multiple copies of a single base class in different legs of the inheritance tree and override the default behaviour of the engine) and not queryable at runtime without really nasty parrot assembly code.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk