My ECMAScript 7 wishlist

Axel Rauschmayer axel at
Thu Jun 5 16:20:09 PDT 2014

> * `Function.empty` - a standard empty function that can be used when you just want an empty function (IMHO, it indicates intent much better than other options toda).

Ironically, that’s what Function.prototype is. But using that object in that capacity is beyond confusing. I’d prefer a different name such as “noop” or “doNothing”; “empty” doesn’t feel right in the context of something executable.

Also, I don’t find using an empty arrow function too bad (to me, it looks quite intention-revealing):

someAsyncMethod(() => {});

Dr. Axel Rauschmayer
axel at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list