Adam Milligan's blog



Adam MilliganAdam Milligan
Pseudo-classical inheritance in JavaScript -- a rebuttal
edit Posted by Adam Milligan on Sunday March 07, 2010 at 10:35PM

A couple weeks ago Davis wrote about using pseudo-classical inheritance to make your JavaScript more object-oriented. I agree with a number of his points about the goal of well-structured code. However, based on my just-over-a-month experience in JavaScript, I personally don't like to shoehorn the language into object-orientation via pseudo-classical inheritance.

For the sake of examples consider the following class hierarchy: Athlete, Footballer, and Defender.