On Thu, Jun 07, 2001 at 01:17:45AM +0100, Simon Cozens wrote:
> On Thu, Jun 07, 2001 at 12:24:50AM +0100, Graham Barr wrote:
> > Can someone post a few ? I am open to what are the pros/cons
> > but right now my mind is thinking " Whats the benefit of making
> > $a=(1,2,3); be the same as $a=[1,2,3];  when it could do something
> > different, ie what it does in perl5"
> 
> A reason against making the behaviours ($foo=array vs. $foo=list)
> different would be that you're then making lists and arrays more
> distinct than necessary. Does this make $foo a reference, or the number
> of elements:

But if you change () consider, how do you do 

  $min = (localtime(time))[1];

and if () creates a reference what does

  $x = (1 + 2) * 3;

it's still () in a scalar context.

IIRC when Larry covered this, he did not suggest changing (), but changing the meaning
of the , in the scalar context.

() is a grouping contruct, not a list generator.

Graham.

Reply via email to