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:44
Subject:
Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes andslices
Message ID:
4.3.2.7.0.20000921154329.00bb79b0@armstrong.cse.buffalo.edu
At 03:35 PM 9/21/00 -0400, Buddha Buck wrote:
>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;
>
>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.

And one could argue that:

    @x = map 3*^_, @y;

is cleaner yet...

>>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