Prototypal Inheritance: One Size Does NOT Fit All

There is the prevailing attitude within the JavaScript community that prototypal inheritance will fit for all use cases where object-oriented design is required. However, in real world application development, this isn’t quite so ideal. First, let’s examine the history.

JavaScript, as a language, was designed by Brendan Eich for Netscape back in 1995. He was tasked to design a language that looked like Java, the popular programming language of that time with its promise of cross-platform compatibility. Thus, JavaScript was born… in just ten days. However, there was one problem with Java: classes. Why buck the trend and omit classes if one was trying to emulate the most popular programming language of the time? Why, when tasked with creating a familiar language, would one opt for a design that was alien to contemporary programmers?

Continue reading Prototypal Inheritance: One Size Does NOT Fit All