Karl Glazebrook wrote:
> There is a difference between a List of Lists and a multi-dimensional
array - the
> latter is rectangular, e.g. the rows are all the same size so you don't
have to
> store the sizes of individual ones. So the latter needs much less storage
overhead.
> How would you be proposed this be handled transparently? esp. if calling
external
> C routines.
>
This is only a difference in how P5 implements LOLs vs how PDL implements
n-dim arrays. P6 need not have this difference. A LOL of a simple type,
perhaps with the addition of an attribute (':compact'?) would be stored as
an n-dim array. Non-uniform sized rows would be padded. The dimensions of
the LOL would be stored somewhere just like with a PDL array.

> Reduce functionality equivalent is already available in PDL modules, so I
don't
> see that as terribly urgent.
>
RFC 76 proposes a reduce() builtin that is quite flexible. If we have
something better we should propose that instead, or get Damian to
incorporate the additional ideas into the existing RFC. I think it would be
unfortunate if RFC 76 turned out to be incompatible with the n-dim array
notation we come up with.


Reply via email to