[R6RS] safe and unsafe; declarations

William D Clinger will at ccs.neu.edu
Tue Feb 28 15:32:48 EST 2006


> > > If exceptions like syntax or type errors can be rasied at compile time,
> >
> > This detail has whizzed by me a couple of times, and Will and you seem
> > to regard it as self-evident, but I'm not sure I understand it.  What
> > exactly does this mean in the context of what we're envisioning for
> > R6RS?  Can I catch a compile-time exception?  (Outside of EVAL, that
> > is.)
> 
> I don't know if the exception system will provide a mechanism for
> compile-time (or expand-time, or load-time) exceptions, outside of eval
> (and load), to be caught.  Even if it doesn't, that doesn't mean such
> exceptions can't be raised.

I'd suggest that systems be required to raise some
kind of &syntax exception for syntax errors.  If
the &syntax exception is raised at run time, as is
likely in interpreted systems, then the &syntax
exception will be handled in the usual way.

If the &syntax exception is raised at compile time,
then it will be handled by whatever exception handlers
are in place at compile time.  I don't think the R6RS
should specify the behavior of compile-time exception
handlers.  Leaving those handlers unspecified means
compilers can do whatever they want with syntax and
type errors detected at compile time.

I don't have a problem with that.

Will



More information about the R6RS mailing list