Re: n-dim matrices
[email protected] (Karl Glazebrook) Thu, 31 Aug 2000 08:52:16 -0400
| Newsgroups | perl.perl6.language.data |
|---|---|
| Message-ID | <[email protected]> |
Jeremy Howard wrote: > > > we are after SIMPLE syntax. This means like C, Fortran, IDL and Matlab. > > Perl is about working like most people expect. > > > Yes, we are after simple syntax. We also want to make to hard things > possible. Therefore we want a syntax that is also flexible. > > > To access a single element we want > > > > $a[$i,$j,$k] > > > But this already means "the $i, $j, and $k" elements of a list. It is a very > frequently used construct--I think that changing it will be impossible, and > that creating a new data type that acts contrary to this would be highly > confusing. As I said we can use other characters, I am warming to the ; proposal. I am happy with @ for slices and $ for single elements assuming the deref stuff can be resolved. I am anxious to avoid too many levels of brackets as they just look plain ugly. $a[$i;$j;$k] for a single element would do it for me, and @[10..20;10..20] for a slice. I don't believe we should bend over backwards not to break any existing perl5 syntax, that was done for perl4->perl5 and had led to all kinds of uglyness. Karl