[R6RS] Re: Safe/unsafe mode issues

Michael Sperber sperber at informatik.uni-tuebingen.de
Wed Feb 15 02:15:27 EST 2006

William D Clinger <will at ccs.neu.edu> writes:

>> The R5RS uses these formulations in contexts where
>> 1. a procedure is called on an argument it is not prepared to accept,
>>    i.e. a bug in the program,
> It's much more subtle than that.  The R5RS explicitly allows
> implementations to extend the domains of standard procedures,
> so you can't assume that calling a procedure on an argument
> it is not prepared to accept is a bug.  In an implementation
> so extended, it may be a proper (though non-portable) thing
> to do.  If the code is then executed in some other system,
> it becomes a bug, but the bug lies in the mismatch between
> the expectations of the non-portable program and the person
> who thought it was portable.

Thanks for explaining---as I suspected, I hadn't thought quite as far
on this as you have.  You're probably right in that most
implementations don't cover your list exhaustively (and even Scheme 48
leaves out one or two items---however, I think these are officially
considered bugs in Scheme 48), but I still believe many
implementations cover many of them.  (Maybe actually trying this out
would help---I might do that.)

I still think it's desirable to require an implementation, in safe
mode, to "signal an error" in most of the situations you describe.
Sure, implementors might extend the domains, but the library modules
would allow them to provide extended versions separately.  Moreover,
maybe the wording should be changed on those where we don't want to
require implementations to "signal an error."

> We really have to nail this down.  The R5RS requires all
> implementations to provide "a syntactic mode that preempts no
> lexical conventions of this report", but implementors have
> not paid much attention to this. 
> [...]
> I don't want to duplicate that experience with safe/unsafe.
> If we're going to require something, let's require it in a
> way that people can use without beating implementors over
> the head with the Common Lisp standard.

There's that---I don't know what to do about that generally.  Many
implementors haven't implemented all of R5RS---especially the macros
come to mind.  Any suggestions?

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

More information about the R6RS mailing list