> > $foo.{bar_attr} = 1; > > > > 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"?
Because changing: $foo->{bar_attr} to: $foo.{bar_attr} is a generic, purely syntactic change and easily automated, whereas changing it to: $foo.bar_attr is a semantic change (why does *this* particular instance change to a method call, rather than a hash look-up?) and consequently *much* harder to get right. > > (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. Sure. *You* would never do it. Neither would I. But TMTOWTDI. And if we don't support this, people will be forever having to create Perl 6 adapter classes just so that they can make use of legacy Perl 5 code. :-( Damian