At 8:25 AM +0000 3/10/03, Graham Barr wrote:
On Sun, Mar 09, 2003 at 02:08:02PM -0500, Dan Sugalski wrote:
 At 1:52 PM -0500 3/9/03, Uri Guttman wrote:
 >  >>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
 >
 >
 >   DS> * Objects have properties you can fetch and store by name
 >   DS> * Objects have methods you can call
 >   DS> * Objects have attributes you can fetch
 >
 >and store

 Well... I'm not sure about that. Classes can store data in object
 attributes, but there isn't necessarily a public API through the PMC
 to do this. Basically if you can get to it through a PMC's vtable, it
 was on the "Objects have" list. I'm not sure that storing into an
 attribute should be easily doable from the outside.

 Methods have access to an object's internal bits, so the class
 methods can poke into slots in the attribute array directly, which is
 probably how they'll work.

Surely thats a high-level restriction that Perl will impose. Why should Parrot impose that restriction ? Other languages may want to access attributes from outside the class.

The big reason to impose it is because if I do, then parrot doesn't need to expose the details of attributes to user code. That seemed to make sense at the time, but since we're letting user code fetch attributes by name or slot number as it is, I'm not sure that one more vtable entry is a problem.


I'll add in update capabilities to the spec.
--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to