[plt-scheme] immutable pairs

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Feb 16 11:58:24 EST 2004

At Sun, 15 Feb 2004 20:18:23 -0500, "Neil W. Van Dyke" wrote:
> The immutable pairs in MzScheme... are there any runtime performance
> issues, or anything else I should know about, before I use them
> extensively?

No - they're normal cons cells, just with an extra bit set near the
type field. (The same is true for strings.)

> (I'm rewriting my Web URI library, and think I want to be able to use
> immutable lists and immutable strings in the internal representation, so
> that accessors can request, e.g., the parsed path list without me having
> to make a copy or violating encapsulation.)

Good - that's exactly why we added immutable cons cells and strings, so
they should work fine.


Posted on the users mailing list.