[Top][All Lists]

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

Re: Shared arrays

From: Marius Vollmer
Subject: Re: Shared arrays
Date: Thu, 28 Oct 2004 13:48:29 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Mikael Djurfeldt <address@hidden> writes:

> 2004-10-27  Marius Vollmer  <address@hidden>
>       First cut at integrating uniform vectors from srfi-4 with the rest
>       of Guile.  This change replaces scm_tc7_byvect with a s8 uniform
>       vector.  The plan is to gradually replace one type after the other
>       until none is left and then to consider general cleanups and
>       optimizations.
> This is great.  Just one comment.  I do hope we'll keep the ability to
> create shared arrays.  This is similar in spirit to list structures
> and mutation-sharing substrings, and extremely useful.

Yes, definitely.  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

reply via email to

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