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

From: Michael Sperber <sperber>
Date: Sun Feb 25 04:53:22 2007

Felix Klock <pfr6rs_at_pnkfx.org> writes:

> Here's one I find useful occasionally: doing arity checking ahead of
> time. Larceny will do this for "known procedures." [1]
>
> % larceny
> Larceny v0.93 "Deviated Prevert" (Nov 10 2006 04:27:45, precise:BSD
> Unix:unified)
>
>
>> (let* ((f (lambda (a b) 3)) (g (lambda () (f 4)))) g)
>
>
> Error: Wrong number of arguments to known procedure ((begin .f|3) '4)
> Entering debugger; type "?" for help.
> debug>
>
> [1] http://www.ccs.neu.edu/home/will/Twobit/p2background.html#known

Why is it not enough for the compiler to just issue a warning, and to
then abort at run time? (Scheme 48 also does some degree of arity
checking at compile time, and offers a special mode to make warnings
abort the compiler.)

-- 
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
Received on Sun Feb 25 2007 - 04:53:20 UTC

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