[racket] What are "impersonators" used for

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Fri Jan 20 05:49:16 EST 2012

Harry,

Impersonators are used to implement some of the contracts, especially
higher order contracts for mutable values such as box/c and vector/c.  They
"impersonate" a box or vector by intercepting -ref and -set! operations and
wrapping the contained value in a contract after getting it / before
setting it.

Carl Eastlund

On Thu, Jan 19, 2012 at 4:19 PM, Harry Spier <vasishtha.spier at gmail.com>wrote:

> Dear list members,
>
> In the Racket reference under "reflection and security" they give the
> functionality of "impersonators".  As far as I can see there is no mention
> in the Guide.  I can see what they do, but I'm unclear what they are used
> for.  Could someone give me a relatively simple example of where and what
> they would be used for.
>
> Many thanks,
> Harry Spier
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120120/e889b65a/attachment.html>

Posted on the users mailing list.