[R6RS] safe and unsafe; declarations

dyb at cs.indiana.edu dyb at cs.indiana.edu
Tue Feb 28 14:08:27 EST 2006


Will,

Thanks for your thorough---and thoughtful---analysis.  It's right on
the money in my opinion.

The declaration mechanism you propose is interesting as well, at least
as a basis for discussion.

I have a couple of questions regarding the mechanism:

1. You say that "implementation-specific declarations are likely to have
static rather than dynamic scope."  What about the standard declarations?
If static, will they be hygienic in the sense that a declaration
introduced by a macro affects only the code introduced by that macro?

2. Will there be any requirements for when an exception is raised?  For
example, we might require syntax errors to be raised at expansion time,
require them to be raised at run time, or allow them to be raised
at either time.  The same goes for most other errors, including type
errors and undefined reference errors.  Other times, like compile or
load time, are possible as well.

If exceptions like syntax or type errors can be rasied at compile time,
say, is it legitimate for a program to signal the error even if it
cannot prove that the code manifesting the problem will be evaluated.
For example:

  (if x (if))          where the implementation cannot determine statically
                       x's boolean value

  (define (f x)        where the implementation cannot determine statically
    (car (- x 1)))     whether f will be called

Kent



More information about the R6RS mailing list