> From: [email protected] [mailto:[email protected]] > 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). _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

