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

Re: Array modification feature



A neat feature in arrays which would have been useful to me many times
recently would be the ability to tell if any element of an array has
been modified since some other time.  Basically, this would involve one
bit associated with an array which is turned on each time an ASET is
done.  Two separate primitives for the array would be able to get or set
this bit, also.

The advantage of this arises in the following type of situation:

(progn (unmodify-array foo)
       (do-something-which-might-modify foo)
       (if (modified-array foo)
	   (make-consistent foo)))

Where presumably MAKE-CONSISTENT is a rather time consuming function.
Also, something might want to PROCESS-WAIT until foo has been modified.

I have a hunch that a feature like this wouldn't be too hard to
implement on the LISP machine (although, granted, I don't know).
Perhaps another bit could be set upon AREFing an array.  Just what to do
about ALOC, I don't know, although for my purposes, it doesn't matter,
because I'm using numeric arrays...

Any other thoughts on this?  How difficult would implementing such a
feature be?
			-- Dave