guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared arrays


From: Mikael Djurfeldt
Subject: Re: Shared arrays
Date: Thu, 28 Oct 2004 13:54:14 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Marius Vollmer <address@hidden> writes:

> What worries me a bit right now is that one-dimensional shared
> arrays look like (uniform) vectors, but you can't use them in all
> the places that you can use (uniform) vectors.
>
> For example (excuse the density):
>
>   (vector? (make-shared-array (make-array 1 3 3) (lambda (i) (list i i)) 3))
>   => #f
>
> although one can of course argue that the diagonal of a 2-d array is a
> vector.

Yes,

I think it's ugly to have two alternative representations for a
1-dimensional list of numbers (uniform vector + 1D uniform array).
Just as we convert bignums small enough to fit in an inum, we should,
in my opinion, only use the uniform vector representation.

Or, perhaps even simpler, represent uniform vectors as 1D arrays.

M




reply via email to

[Prev in Thread] Current Thread [Next in Thread]