[R6RS] Safe/unsafe mode

dyb at cs.indiana.edu dyb at cs.indiana.edu
Thu Jul 13 14:06:41 EDT 2006

> I wish to preserve the freedom to perform some of
> those checks in unsafe code while omitting others,
> even if the omitted checks aren't redundant in the
> context of the call, based perhaps on such factors
> as the context of the call and the priorities for
> the fast, small, and debug qualities.  A semantics
> that is truly based on having two versions of each
> procedure, safe and unsafe, would not seem to allow
> for such fine distinctions, and might therefore be
> less safe in practice.

That's not correct.  The unsafe version has unspecified behavior and may,
for example, raise an exception when given an argument of the wrong type
when called from one place but not from another or even when called twice
from the same place.  This allows the compiler complete freedom to do as
little or as much checking at the call site as it pleases.


More information about the R6RS mailing list