Try to compile this code, csc will complain about a known
procedure called with the wrong number of arguments:

(let ((x (lambda (y) (+ y 1)))) (x 2 3))

Now try this equivalent code, csc will happily accept it.
(Thus converting the compile-time error into a run-time error.)

((lambda (x) (x 2 3)) (lambda (y) (+ y 1)))

Practical consequence: when writing macros, one will have
to keep in mind, that chicken will not catch the error
in the second case.  I dunno how many possible optimizations
become a causality that way.  But I'd love to off-load my
brain from tracking that one.

Would it be hard to make csc catch this one.  At least for
the case of immediate application in known context?


Best

/Jörg



...........



_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to