Comment on Stop Using Constructors in JS (2012)parentComments−vkjv11yPersonally, I think this makes it unclear what the code actually does--IMHO, forgetting `new` is not a real concern.I generally just add a `create` method to the prototype so that you can do things like, `_.map(items, Constructor.create)`−mattdesl11yThe issue has very little to do with forgetting "new" and more to do with hiding implementation details and improving module composability.
Comments
Personally, I think this makes it unclear what the code actually does--IMHO, forgetting `new` is not a real concern.
I generally just add a `create` method to the prototype so that you can do things like, `_.map(items, Constructor.create)`
The issue has very little to do with forgetting "new" and more to do with hiding implementation details and improving module composability.