Had you invested in low-cost index funds instead of doing what you did, would you have more or less? How much more or less?
GreaterThanZero.com


Page 8 of: Object-Oriented Programming in JavaScript Explained, by Thomas Becker   about me  

Unsupported Features

Like many traditional object-oriented languages such as Java, JavaScript does not support multiple inheritance. The reason is the fact that an object's property lookup chain is a linear list that cannot branch. As always, there are workarounds. It is a matter of discretion whether one considers these legitimate techniques or kludges to steer clear of.

Then there is runtime polymorphism, which is not so much unsupported in JavaScript as it is a moot point. The essence of runtime polymorphism in languages like Java and C++ is that one can declare a variable of type (pointer to) base class and then, at runtime, assign to it (addresses of) objects of different derived types. Since JavaScript is an untyped language, objects that were created with different constructors can be used interchangeably at will, without the need for a common base. Consequently, things such as abstract base classes or Java-style interfaces have no equivalent in JavaScript.

Perhaps the most conspicuous omission in JavaScript's support for OOP is access specifiers. All fields and methods of a JavaScript type are public. There is no such thing as private or protected members. All workarounds that I know of involve trade-offs. I would recommend, though, to take a look at Item 35 of David Herman's Effective JavaScript. It explains how JavaScript closures, by their very nature, provide a way to hide information.