On 28 Jan 2003, Aaron Sherman wrote:

> I'm not sure I recall the sufficient, yet irrelevant technical reasons.
> I certainly can't think of anything. It also helps in the case of
> objects that are non truly arrayish or hashish:
>
>       my SuperTree $foo;
>       $foo["Munge"]; # Returns the node whose value is "Munge"
>       $foo[0]; # Returns a node based on tree-position
>
> The only remaining behavior of braces that I can think of as different
> from brackets is auto-quoting, and is there a good reason that brackets
> could not auto-quote?

I think you are still overlooking the autovivification behavior.
i.e. What is the difference between these:

   1)   $a{1234567} = 1;

   2)   $a[1234567] = 1;

Answer: #1 creates 1 element.  #2 creates 1,234,567 elements!
I think that is a big enough difference that perl should not be asked
to guess.

Similar precendents are + vs ~, == vs eq, etc.

~ John Williams

Reply via email to