On 4/15/02 1:16 AM, Damian Conway wrote:
> More interestingly, it may also be that, by default, the C<operator:{}> (i.e.
> hash-look-up) method of a class invokes the accessor of the same name as the
> key, so that:
> 
> $foo.bar_attr = 1;
> 
> could also be written:
> 
> $foo.{bar_attr} = 1;
> 
> and still have the same Uniform Access effect.
> 
> This would help Perl 6 support legacy Perl 5 OO code

How?  Perl 5 code doesn't use ".", and if Perl 5 code has to be changed
anyway, why not change it "all the way"?

> (not to mention legacy Perl 5 OO coders ;-)

I dunno, the "$foo.{bar_attr} calls a method" thing seems kind of pointless
(and mildly evil) to me.  It seems like a throwback to the bad old days of
tied-hashes-as-oo.

-John

Reply via email to