On 11/16/14, 2:12 AM, Brendan Eich wrote:
Are you confident this change is web-compatible?
No, I said that up-thread already. So there may be nothing to worry
about here spec-wise for now.
-Boris
___
es-discuss mailing list
I wish, I could write elegant two of the code pattern I use frequently.
Patten 1.
HTML button click event handler should always return false (ie, when
you never want the submit action).
So I always write.
function someClickHandler(){
try {
doStuff();
doAnotherStuff();
Returning false isn't the common way to prevent the default action anymore,
event.preventDefault() is. In that case you'd just preventDefault at the
top of your function.
The other use cases can be satisfied with simple high order functions like
andReturn(f, x) or compose(f, g).
On Sun, Nov 16,
Consider when Array.isArray would be used. In my experience, checks to see
if something is an array are used for:
- deciding how to iterate it (for(;;) vs for..in, for example)
- deciding if the output should be an array or plain object (e.g. lodash)
- early errors, e.g. runtime typecheck
2014-11-17 3:34 GMT+01:00 Frankie Bagnardi f.bagna...@gmail.com:
Consider when Array.isArray would be used. In my experience, checks to
see if something is an array are used for:
- deciding how to iterate it (for(;;) vs for..in, for example)
This is a good one. Here, again, a typical
5 matches
Mail list logo