[racket-dev] contract-out

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Sep 25 20:14:46 EDT 2011

IMO, a better approach for disabling contracts is to have the client
decide whether it wants the contracted version or the plain one --
which is a rough mirror of how unsafe operations are done (with the
choice being made by requiring one file or another).  Then, there
could be a facility that associates a safe identifier with an unsafe
version, so you could write (unsafe foo) -- which will be the unsafe
operation for builtins that have one, and in case of a contracted
function it will be the uncontracted one.

(Finally, there could be a "sub-namespace" facility where an
identifier can have multiple bindings, and (unsafe foo) would actually
expand to the unsafe sub-binding.  This is a solution to a bunch of
other things that are hard to get at the moment, like match pattern
identifiers and more.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the dev mailing list.