Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices
[email protected] (Ilya Zakharevich) Tue, 19 Sep 2000 16:20:21 -0400
| Newsgroups | perl.perl6.language.data |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Sep 18, 2000 at 08:56:28AM -0400, Karl Glazebrook wrote: > Firstly does your proposal allow for a slice like 10..20:2 (i.e. with > a stride of 2) ? As shipped: no. But if this is made a primitive (which I would not like), then the only change which is needed is to make the tie::multi::range() token to be followed by 3 numbers. [Aside: Why not make ternary-range operator into 10 :: 20 :: 2 ?] > Secondly, what about having multidim support in the core so that the > tie-tokenisers get optimised away? i.e. would we be able to > say something like: > > @x = @y[10..20; 1..3] > > for core arrays Yes, this is item 9 of the proposal. > 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; This is not an overloading issue, this is the context resolution issue. IMO, the cryptocontext turns out to be evil with an exception of extremely short scripts - and this is with what we have now. A proposal like this would make a nuisance into a nightmare. Yes, it looks nice, but it contradicts many rules, so in the long run it is going to be a significant step back. ...Unless the whole idea of cryptocontext is turned to become something else... Ilya