[r6rs-discuss] Re: [Formal] Allow compilers to reject obvious violations

From: William D Clinger <will>
Date: Sun Feb 25 17:37:27 2007

I am posting this as an individual member of the Scheme
community. I am not speaking for the R6RS editors, and
this message should not be confused with the editors'
eventual formal response.

Per Bothner wrote:
> Hm. Now you lost me. You seem to preclude a compiler complaining
> about this expression:
> (lambda (k) ((lambda () 12) (k 17)))
> This seems to me an expression that cannot possibly be useful
> or correct or what the writer intended. Thus it would seem
> useful that a compiler complain.

I agree that the expression is extremely unlikely to be
useful or correct or what the writer intended, and I
agree that it would be useful for compilers to complain
about it.

For the compiler to reject the program that contains it,
however, a higher bar should perhaps be set. I decided
the most defensible of the general critera I could state
was the one I stated. If the community is unwilling to
accept the one I stated, then I doubt whether folks would
accept any general criterion for rejection, and we will
be left to consider whether we want to state more specific
criteria (as Marcin 'Qrczak' Kowalczyk proposed) or none
at all (as Arthur A. Gleckler argued).

> Now it may be useful to have a mode where such code would
> only emit a warning, and also to have a mode where this
> would be an error. But a compiler that at least warns
> would seem to be more useful for real work than a compiler
> that accepts clearly-bogus code silently.

Oh, I quite agree. If all rejection criteria are rejected,
then I would hope the editors might consider warning that
a warning may be issued. You might even consider my formal
comment to have been a straw man, through which I hoped to
increase the community's (and editors') awareness of the
subtle issues at stake here. You might consider Aziz's
example in the same spirit.

Will
Received on Sun Feb 25 2007 - 17:37:21 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC