Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-25 Thread Aaron Sherman
On Tue, 2004-03-23 at 13:11, Goplat wrote: > @(...) is the "list context" operator in S3. I hope array references won't > explode in list context, that would be very annoying when making > multi-dimentional arrays: > > @foo = ([1, 2], [3, 4]) # oops, would be (1, 2, 3, 4) > @foo = ($([1, 2]

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-25 Thread Luke Palmer
Aaron Sherman writes: > I would expect [] to force itself into scalar context anyway. Is there > ever a reason to want otherwise? Clearly the entire point of [] is to > create a scalar array ref from a list of arguments. > > More to the point is there ever a reason to want any array ref in list >

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-25 Thread Larry Wall
On Thu, Mar 25, 2004 at 08:42:53AM -0700, Luke Palmer wrote: : Aaron Sherman writes: : > More to the point is there ever a reason to want any array ref in list : > context to NOT explode other than []? I can't think of any. : > : > push @a, $b : > : > Is it too non-obvious that if $b is an ar

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-25 Thread Brent 'Dax' Royal-Gordon
Larry Wall wrote: say @bar.elems; # prints 1 C? Not C? -- Brent "Dax" Royal-Gordon <[EMAIL PROTECTED]> Perl and Parrot hacker Oceania has always been at war with Eastasia.

Re: Dereferencing Syntax (Was: Outer product considered useful)

2004-03-25 Thread Larry Wall
On Thu, Mar 25, 2004 at 11:35:46AM -0800, Brent 'Dax' Royal-Gordon wrote: : Larry Wall wrote: : > say @bar.elems;# prints 1 : : C? Not C? It's just a "println" spelled Huffmanly. Larry