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