Christian Soeller wrote:
> No, at least 18. One more piece of semantics that would be appreciated
> is optional omission of trailing dimensions in slices, e.g. for a 3-dim
> @a:
>
>   @a[0:1] == @a[0:1;] == @a[0:1;;]
>
I'd rather see the ';' be required, but the '(0..)' not be required, so you
could still say:

  @a[0:1;;] == @a[0:1; (0..); (0..)];
  @a[;0:1;] == @a[(0..); 0:1; (0..)];
  @a[;;0:1] == @a[(0..); (0..); 0:1];

Note that @a[;0:1;] _does_ have a useful meaning--it is the 1st and 2nd
planes cut across the 2nd dimension of a cube. Think of the actual cartesian
product created by [(0..); 0:1; (0..)] and it's pretty clear.

I've been doing lots of thinking over the last couple of days and I think
I've got all the notation issues sorted out, except for the notation for
index iterators (which we talked about using @* for in some way). On Sunday
I'll try and churn out RFCs for all of them (they are all the ideas we've
already talked about, but with ambiguities and implications sorted out).
Under one of these RFCs @a[0:1] will have a useful meaning, so I don't want
it to be equivalent to @a[0:1;;].

The RFCs I envisage are:

 - Overview of matrix RFCs
 - Notation for declaring and creating matrices
 - Notation for declaring sparse matrices
 - Notation for indexing matrices with a LOL as an index
 - ';' for slicing matrices
 - @#mat for getting the dimensions of a matrix
 - Extension of standard LOL notation to multiple elements
 - Automatic dereferencing of 1d matrix slices
 - @* as a magic iterator


Reply via email to