Re: Fragmented arrays?

Adam Chlipala <[email protected]> Tue, 19 Jan 2010 12:43:50 -0500
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
Jon Loldrup wrote:
> I read that the basis library Array structure has constant time access
> and update*.
> If an array of length n has to be able to be updated in constant time
> (that is, invariant from the length of the array), I can only see that
> it can be done if arrays are allowed to be fragmented across memory,
> like lists are.

SML arrays are mutable, so they can be implemented in the same way as in 
C, with a run-time size slot added for each array.  You seem to be 
discussing issues more pertinent to SML vectors, which are a distinct 
(immutable) type family, for which no cell update operation is provided.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev