Felix Klock <[EMAIL PROTECTED]> 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

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to