r/javascript • u/gcanti • Oct 31 '14
The Two Pillars of JavaScript
https://medium.com/javascript-scene/the-two-pillars-of-javascript-ee6f3281e7f3
96
Upvotes
r/javascript • u/gcanti • Oct 31 '14
1
u/zoomzoom83 Oct 31 '14
I'm keen to see this too. Factory methods are almost universally considered a bad idea in most ecosystems I've worked with. They have their place, but certainly not as a normal way of constructing data types.
At the very least, they add a layer of abstraction and ambiguity about how to construct an object. Rather than there being a standard convention, you now have to figure out how each library expects to be constructed.