On Wed, 30 Aug 2000, Jeremy Howard wrote:

> Karl Glazebrook wrote:
> > Dan Sugalski wrote:
> >
> > > On the other hand, just extending out arrays to be multidimensional may
> > > well be good enough.
> > >
> >
> > This is my view.
> >
> Ditto. As I said yesterday, my current preferred option is that a list ref
> of list refs will also support a multidimensional indexing syntax.

I'd hope so, but that's up to Larry.

> Furthermore, if it has a single basic data type and is declared ':compact'
> it should be stored in a contiguous block of memory.

If you do a plain

  my int @foo;

it'll end up with a contiguous block of memory anyway. :compact seems to
me more an attribute for sparse arrays than anything else.

> Finally, I believe that
> we need to adjust RFCs for reduce(), list generation, and
> zip/unzip/partition/reshape to work with n-dim matrices.
> 
> Oh, and we also would need to look at how we can hide as much of the
> dereferencing as possible.

If multi-dim arrays get in, there won't *be* dereferencing. This:

  $foo[1;2;3]

will directly access an array element. Couple of quick multiplications an
a base pointer add and pow--you get your referenced element.

                                Dan

Reply via email to