Re: RFC 231 (v1) Data: Multi-dimensional arrays/hashes and slices
[email protected] (Christian Soeller) Tue, 19 Sep 2000 08:41:34 +1200
| Newsgroups | perl.perl6.language.data |
|---|---|
| Organization | University of Auckland |
| Message-ID | <[email protected]> |
> 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; Is this where RFC 231's suggestion for OO slicing comes in (see quote)? > For example, > > $matrix1->[2..5; 2..4] * $matrix2->[1,3,5; 11..64]; > > would denote: create two new objects for the specified submatrices, apply (overloaded) multiplication to these objects. Such a > request is illegal for untie()d arrays; for tie()d arrays it is converted to a call to FETCH_SLICE in a scalar context. > (Alternative: introduce two new tie()d methods: FETCH_SUBOBJECT, STORE_SUBOBJECT.) or is this supposed to be othogonal? Another questing re RFC 231. Is it really required to make the syntactical distinction between ranges (..) and bi_ranges (...)? Some more explanation would be appreciated. Christian