On Sun, Mar 09, 2003 at 01:07:46PM -0500, Dan Sugalski wrote:
* Objects have properties you can fetch and store by name * Objects have methods you can call * Objects have attributes you can fetch * You can fetch a hash of all the properties * When fetching or storing a generic property, you may call a method instead, as methods win * You can fetch a method PMC from the object * You can fetch the object's Class PMC
All of these have vtable entries in the PMC: get_prop, set_prop, get_attrib, set_attrib, get_prop_hash, get_method, call_method, get_class. (Some already have names, I'm doing this from memory)
No, you can't set a method or the property hash from an object PMC. Arguments with good reasons to do so will be cheerfully read and not implemented. :)
How about "target languages allow you to do this"? :) (Python!)
Nope! Python's attributes map to Parrot's properties. I'm going to add in a translation matrix/glossary to the PDD when I write it, as I keep getting confused as to who calls which thing what. :)
Still, I've given up on enforcing no-outsite-writing to attributes. I'm going to add in a set_attrib vtable method, and let alternate-object systems have at it.
(And you're right, I was getting interface and implementation sloppy before, which is a mistake I'm trying not to make in the actual spec)
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk