3 ms·
Agreed, `new` and `this` are pretty much useless boilerplate noise. Gimme a closure and watch me wipe out a quarter of the text in your source and never even ha
by jsprogrammer 12y ago
Agreed, `new` and `this` are pretty much useless boilerplate noise. Gimme a closure and watch me wipe out a quarter of the text in your source and never even have to think about using a`bind`.
- bttmly 12y agoYes, absolutely. In fact, this post is really just providing a trick for not having to always write `new`. Using closures for object construction is the real 'new-less' JavaScript. As a nice parallel, the trick explained in the post lets you construct objects using `new` without typing it, whereas object factories that use closures allow you to use `new` without requiring it.