[r6rs-discuss] [Formal] Allow compilers to reject obvious
violations
Michael Sperber
sperber at informatik.uni-tuebingen.de
Sun Feb 25 04:53:20 EST 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
More information about the r6rs-discuss
mailing list