[matthias@sorted.org: [Fwd: why are there no mutable collections?]]
scgmille@xxxxxx 28 Jul 2003 15:04 UTC
Forwarded on behalf of Matthias:
From: Matthias Radestock <xxxxxx@sorted.org>
Organization: LShift Ltd
To: srfi-44@srfi.schemers.org
Subject: why are there no mutable collections?
The SRFI document refers to mutability in several places, yet the only
mutating operations defined are linear updates. Linear update, as it is
currently defined is "optional", ie. linear update operations are free
to return fresh data structures. Thus linear update is little more than
an optimization technique based on hints from the user, and the SRFI
does not cater for mutable collections.
Many Schemes have mutable collections (e.g. hash tables are usually
defined as mutable collections) and there is a substantial code base
that relies on this mutability. Such code could not be easily modified
to take advantage of this SRFI, which seems unfortunate.
Mutation is evil in most cases, but it can be useful. That's why Scheme
has set!, set-car! and set-cdr!. So can we please have mutable collections.
Matthias.
----- End forwarded message -----
--