develooper Front page | perl.perl6.language.data | Postings from September 2000

Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices

Thread Previous | Thread Next
From:
Jeremy Howard
Date:
September 30, 2000 14:45
Subject:
Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices
Message ID:
001201c02b28$8ac77eb0$c1252ccb@SAMANTHA
Karl Glazebrook wrote:
> Ilya Zakharevich wrote:
> > On Thu, Sep 28, 2000 at 11:39:51AM -0400, Karl Glazebrook wrote:
> > > > > so what is wrong with the statement '@y = 3*@x;' then ?
> > > >
> > > > That other constructs *also* create an array context, in which the
> > > > behaviour of multiplication you propose is not appropriate.
> > >
> > > for example?
> >
> > A prototypeless-function call.
> >
> get rid of them all!!

Please no! Anything that makes it harder to write 'quick-and-dirty' scripts
is never going to fly--this is part of what makes Perl special.

I would like to see array operations occur inside prototypeless function
calls, which as Ilya notes already creates array context. This is not
fundamentally 'inappropriate', although it is a change from P5. It just
means having to type 'scalar @arr' when that's what you mean--and having the
P52P6 converter do the same.



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About