Jarkko Hietaniemi wrote:
> > By saying $hashref->{[LIST]} instead of $hashref->{{LIST}},
> > the only thing you would change is the semantics of the expression,
>
> Huh? Unless I missed something I didn't propose using $hashref->{[]}
> anywhere... I used $ref->{{LIST}} and $ref->[[LIST]].
Right; *I* am proposing $ref->{[LIST]}.
> > not the [il]legality.
>
> ->{{ *is* illegal now.
I'm suggesting a different syntax which isn't illegal, but which has
barfonious semantics. All you'd need to do is change the semantics of
$ref->[[LIST]]
$ref->{[LIST]}
to make them useful in the way you suggest.
But, even if you wanted to use $ref->{{LIST}} (or my alternative,
$ref->{[LIST]}), where would that leave people who want to use
stringized references as hash keys? Or, as proposed for perl6,
the ability to use true references as hash keys?
--
John Porter
We're building the house of the future together.