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

From: Per Bothner <per>
Date: Sun Feb 25 16:57:56 2007

William D Clinger wrote:
> > (call-with-current-continuation
> (lambda (k) ((lambda () 12) (k 17))))
> Error: Wrong number of arguments to known procedure (let () 12)
> Entering debugger; type "?" for help.
> debug>
>
> That, according to both the draft R6RS and to the
> proposal of my formal comment, is incorrect behavior.

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.

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.
-- 
	--Per Bothner
per_at_bothner.com   http://per.bothner.com/
Received on Sun Feb 25 2007 - 16:59:28 UTC

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