undefined being treated as a missing optional argument

Brendan Eich brendan at mozilla.org
Fri Apr 13 14:42:28 PDT 2012

Allen Wirfs-Brock wrote:
> Making f() and f(undefined) mean the something (but only sometimes, you have to look at the actual implementation of f to know for sure) seems to be add just another internal inconsistency that makes it harder to form a general conceptual model of the language.

This may be, but parameter default values where delegation makes a case 
explosion are bad too. I'd take the "internal inconsistency" hit. Tab 
Atkins cited Lisp (Common Lisp, I take it) experience. Sam has similar 
testimony from Racket (neé PLT-Scheme).


More information about the es-discuss mailing list