At 2:08 PM +0000 1/9/03, Peter Haworth wrote:
On Wed, 8 Jan 2003 15:39:52 -0500, Dan Sugalski wrote:At 7:29 PM -0700 1/7/03, John Williams wrote: >Perhaps you could explain how the $0 object will work in your mind. >A5 assert that $0 is a object, and it behaves as an array and a hash, >depending on how you subscript it. Typeglobs are gone, and we're all >hoping the TIE interface is gone too, so how will this effect be >accomplished?All variables in parrot are implemented as PMCs, and all PMCs may be accessed with a string, integer, or PMC subscript or set of subscripts. For PMCs that don't do subscripting this will be a fatal error, for those that do it'll do whatever the PMC is supposed to do. (In the case of $0, do the lookup)That's phrased like it's the type of the subscript value which determines whether it's a hash-like or array-like access. Shouldn't it be the type of brackets which do that?
[snip]
Got it in two, more or less. I'm waffling on whether a type flag in the key structure is necessary--I can see it going both ways.Maybe it is the right way round, and I've read your remarks the wrong way. Or maybe it is the value type which determines the type of access at the PMC level, and it's up to the compiler to force the type based on the brackets.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk