Juerd wrote:

chromatic skribis 2004-04-14 12:32 (-0700):

That's exactly my objection to this idea.  I think it goes too far to
make simple things simpler while making complex things impossible.


Absolutely false.

This is an addition to the already existing {}, which should stay.
%foo{ something } will still be necessary if:

* the key is the result of an expression
* you want a slice
* the key is not a string
* the key is a string that isn't simple enough (i.e. contains \W in a
way that isn't supported)


I really don't want to explain why there are two hash key access
mechanisms, one that only works for single keys that match a very
simplified regular expression and one that works for one or many hash
keys with no restrictions.


There are already two. One that works with expressions and one that
works for one or many hash keys as long as they are literals.

%foo<<$bar>> doesn't quite do the same as %foo{$bar}.

That's one method, really - <<>> being like {' '}, and really just carrying on the very familiar idea of different kinds of quotes. Like ' and ".


The ` idea is completely different.

Also, ditching `` quotes strikes me as a fairly dreadful idea. I for one use them almost perpetually. Yes, I could use qx// instead, but I could also use qq// instead of "".

Ultimately, ` looks like an opening quote character, and so people will expect it to behave like one. I think that violates the principle of least surprise.

Reply via email to