News for hackers. Stuff that matters.
Re:Stop Using Constructors in JS (2012) by couchand on Thursday November 06, 2014 @09:32AM (#8567123)
JavaScript code rarely uses inheritance because it's completely out of place. Most non-trivial JS apps I've worked on make heavy use of duck-typing polymorphism. It works great because you don't need to deal with arcane class hierarchies: just make sure the object has what it needs to get its own job done.

Using a constructor in the first place in a language that really doesn't need them is what's dogmatic.

There are no comments on this comment yet.