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

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

Thread Previous | Thread Next
From:
Buddha Buck
Date:
September 21, 2000 12:35
Subject:
Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes andslices
Message ID:
4.3.2.7.0.20000921153139.00baeae0@armstrong.cse.buffalo.edu
At 03:26 PM 9/21/00 -0400, Karl Glazebrook wrote:

> > > Finally as an overload expert what do you think about the proposals
> > > to make arrays overloadable objects so one can say things like:
> > >
> > > @x = 3 * @y;



>I can see that allowing expressions on @x would require considerable
>changes to perl core.
>
>Is there a nice way to resolve this problem?

What do you think of:

   $x[|i] = 3 * $y[|i];

or

   @x = 3 * $y[|i];

It's not as clean as @x = 3 * @y, but it is cleaner context-wise.

(Working on RFC207(v2) even as I write)



>Karl


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