[R6RS] Safe/unsafe mode

William D Clinger will at ccs.neu.edu
Thu Jul 13 14:10:32 EDT 2006

Kent wrote:
> Since the only purpose for using unsafe code is to increase efficiency, I
> imagine I wouldn't be the only one upset to learn that unsafe declarations
> effectively disable some optimizations.

Well, that's going to be the case with any proposal
that has been advanced so far, and with any I can

The problem isn't so much that unsafe declarations
effectively disable some optimizations as that some
optimizations cannot cross a boundary between safe
and unsafe code.  The answer to that, if you are
concerned about efficiency, is to reduce the number
of boundaries between safe and unsafe code.

Kent's preferred semantics, which I call Proposal 3,
inserts the largest number of boundary crossings, and
would therefore suffer the most from this problem.
Proposal 1, whose description I have not yet finished,
would have the fewest boundary crossings, and would
suffer the least from this problem.  Proposal 2, which
is my preferred semantics, would be somewhere in the


More information about the R6RS mailing list