Peter Haworth skribis 2004-04-20 14:56 (+0100):
> > I think %hash<<key key key>> is best explained as %hash{ << key key
> > key >> } with implicit curlies, not as an alternative to curlies.
> In that case, why aren't you suggesting something more in line with that?
> Here's what I'd like to see instead of your suggestion:
> %hash<<key key key>> === %hash{<<key key key>>}
> %hash'key' === %hash{'key'}
> %hash"key" === %hash{"key"}
> That has
> * as few keystrokes as perl5's $hash{key}
> * delimiters at both ends, so you can even use non-bareword constants
> * existing syntax reused in the same way as the <<>> variant
> * interpolation allowed in the double quoted variant.
Hm, not bad. Doesn't do anything to arrays yet, but I like the idea.
We could maybe even treat hashes and arrays as list operators. That
would allow whitespace, and also:
@array 15
But I liked about the backtick that it's special syntax, which makes it
recognisable. Still, your idea is doable.
Juerd