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

[email protected] (Buddha Buck) Thu, 21 Sep 2000 15:35:36 -0400
Newsgroups perl.perl6.language.data
Message-ID <[email protected]>
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