- From: Rick Waldron <waldron.rick@gmail.com>
- Date: Mon, 22 Jul 2013 14:39:00 -0400
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
Received on Monday, 22 July 2013 18:39:27 UTC
On Monday, July 22, 2013, Boris Zbarsky wrote: > On 7/22/13 12:14 PM, Domenic Denicola wrote: > >> FWIW I think there are two coherent choices here: `undefined`/function >> only, or anything allowed, with non-functions triggering the default >> behavior. >> > > There's a third choice: undefined and both null trigger default behavior, > functions get called, anything else is disallowed. Not the same, but possibly very similar as at as far as developer comprehension, re: default params: undefined triggers default param, but null does not. function f(a = "hi!") { return a; } f(); // "hi!" f(undefined); // "hi!" f(null); // null Rick > > Or is that what you mean by the "antipattern that DOM specs in particular > have perpetuated"? > > -Boris > >
Received on Monday, 22 July 2013 18:39:27 UTC