> > Lastly, I'd say that function signatures which currently accept a > callback also don't *have* to change. In fact, there may be some value in > allowing both styles (existing callbacks, and my new proposed style) to > co-exist in the same function, giving the calling developer the freedom to > choose. >
Another example of this would be existing interfaces in JavaScript which accept callbacks, like `setTimeout`. Those interfaces could be extended to also be aware of this new behavior, without changing their function signature at all: function foo() { console.log("foo rocks"); } setTimeout(foo, 1000); // or setTimeout(null, 1000) @ foo(); --Kyle
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss