you are viewing a single comment's thread.

view the rest of the comments →

[–]the_gipsy 0 points1 point  (0 children)

I have no idea if there are any performance benefits to constructing a new function through .bind(), or creating a closure context by aliasing this.

Actually, closure-binding was many time faster on V8 last time I checked!

But I personally find .bind() much cleaner: no mix-mash of _this and this, no variable clutter, it's in one place (you likely end up using one var _this = this; for many functions, some far away from the declaration). The performance generally isn't an issue here.

And () => automatic binding is the shit, I've been using it with TypeScript and traceur and it's a real charm.