On Mar 28, 4:42 pm, Abdulaziz Ghuloum <[email protected]> wrote:
> Actually, Ikarus does some type checking, and it does
> detect the division by 0.  It however cannot do anything
> about it in this case since Scheme requires that the
> exception be raised when the division operation is
> performed at run time.

Uhm ... But what's the rationale for deferring the error so
late? I must confess that I am dubious
about this "feature". What it is you opinion?
Should the standard allow smart compilers, able to
evaluate at compile time (some of) the definitions
to reject invalid programs or not?
In the case of the zero-division-error we are discussing
there is no way this can ever be a valid program, so
why to make acceptable something which will never run?
To be clear: I want to understand if the current
behavior is the way it is just for performance
reasons, for simplicity reasons (we don't want
to require too smart compilers), or if there is
something else I am missing.

             Michele

BTW, I have another question, is the Ikarus compiler
smart enough to find errors like this one even in
internal definitions.
In principle definitions of the kind

(define x <some expression depening only on names known
           at compile time>)

could be evaluated at compile time everywhere in the
program, not only at top level.

Reply via email to