> -----Original Message-----
> From: Luke Palmer [mailto:[EMAIL PROTECTED]
> Austin Hastings writes:
> > > From: Juerd [mailto:[EMAIL PROTECTED]
> > > Austin Hastings skribis 2004-04-15 18:38 (-0400):
> > > >   $foo % bar
> > >
> > > " % " is 4 keys: space, shift, 5, space. Too much, IMHO.
> > >
> > > Typability and readability are both VERY important.
> > 
> > In that case, why not define a Class::Hash-like class that does what you
> > need using autoload?
> > 
> > Using p6 you'd get
> > 
> >   %hash.key
> > 
> > instead of p5's
> > 
> >   $hash->key
> > 
> > which is a "better" single-key access, all things considered.
> 
> Most likely because either you couldn't use the Hash's methods, or your
> code would suddenly break should Hash decide to add a method with the
> same name as one of your keys.

I'm sure that if Juerd or someone were to write a "PublicHash" class, they would 
cleverly reverse the access so that some collision-unlikely path would get the methods.

Or use object-indirect :-)

=Austin

Reply via email to