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?

In other words, I don't want to see this happen:

  $a[1];      # array-like
  $a['1'];    # hash-like
  $a{1};      # array-like
  $a{'1'};    # hash-like

It should be like this:

  $a[1];      # array-like
  $a['1'];    # array-like
  $a{1};      # hash-like
  $a{'1'};    # hash-like

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.

-- 
        Peter Haworth   [EMAIL PROTECTED]
"After all, what is your hosts' purpose in having a party?  Surely not for
 you to enjoy yourself; if that were their sole purpose, they'd have simply
 sent champagne and women over to your place by taxi."
                -- P J O'Rourke

Reply via email to