[racket] impersonators/chaperones for lists

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sat Oct 22 17:36:09 EDT 2011

On Sat, Oct 22, 2011 at 4:10 PM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
> I'm missing why there are impersonators and chaperones for various
> datatypes but not for lists.  There's surely a good reason why, but I
> am having trouble reconstructing what it might be.  Anyone?

First, chaperones aren't necessary for lists, because copying a list
preserves all the behavior that chaperones support (state sharing and
equal?).  Second, it would be difficult to add chaperones for lists,
because lists are used extensively in the runtime with the assumption
that simple accesses to the relevant C structure elements work on
anything that is `pair?'.  There are some things that would make list
chaperones nice to have, such as lazily-checked contracts, and so
therefore if the burden of changing the runtime becomes less in the
future, they may happen.
-- 
sam th
samth at ccs.neu.edu



Posted on the users mailing list.