Domenic Denicola (2012-12-30T21:33:40.000Z)
> From: es-discuss-bounces at mozilla.org [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Axel Rauschmayer
> Sent: Sunday, December 30, 2012 16:22

>    9c) using methods as callback functions

The single biggest feature on my ES7 wishlist is the bind operator strawman:

http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator

Far ahead of Object.observe or value objects, this alone would make my day-to-day code much simpler.

As-is I stick with the closure pattern for my classes because (a) I get actual encapsulation; and (b) my methods are "bound" without awkward obj.method.bind(obj)—or worse, in ES3 environments: _.bind(obj.method, obj). Compilers hate me for it, and punish me with worse-performing and memory-duplicating code (vs. the prototype pattern), but for now it's been a tradeoff I'm willing to make. Symbols in ES6 fix (a), but we need the bind operator to fix (b).
github at esdiscuss.org (2013-07-12T02:26:07.026Z)
From: es-discuss-bounces at mozilla.org [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Axel Rauschmayer
Sent: Sunday, December 30, 2012 16:22

> 9c) using methods as callback functions

The single biggest feature on my ES7 wishlist is the bind operator strawman:

http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator

Far ahead of Object.observe or value objects, this alone would make my day-to-day code much simpler.

As-is I stick with the closure pattern for my classes because (a) I get actual encapsulation; and (b) my methods are "bound" without awkward `obj.method.bind(obj)`—or worse, in ES3 environments: `_.bind(obj.method, obj)`. Compilers hate me for it, and punish me with worse-performing and memory-duplicating code (vs. the prototype pattern), but for now it's been a tradeoff I'm willing to make. Symbols in ES6 fix (a), but we need the bind operator to fix (b).