On Prototypal Inheritance, Part 1

NFJS, the Magazine - April 2012

Douglas Crockford refers to JavaScript as “Lisp in C’s Clothing” which gives us an inkling to it’s true power. Unfortunately JavaScript, a language that started with a rushed schedule to production and a specification that was buffeted with strong political winds at its inception, has often been “misunderstood”. Despite its unfortunate beginnings, amidst the stormy waters laden with many a pitfall like global variables, lie a few pearls of wisdom, of which one is prototypal inheritance. In this 2-part article we will take a deep dive into JavaScript’s prototypal nature—we will see how it works, and more importantly how we, as JavaScript developers can leverage it. We will then take it a step further to see how we can develop our own hierarchies to model our code, allowing for better reuse.

An online version of this article is not available. This article is available in PDF, MOBI, and EPUB to those who have subscribed.

About Raju Gandhi

Raju Gandhi

CTO Integrallis Software & Technophile

Raju Gandhi is a Java/Ruby/Clojure developer and a programming language geek. He has been writing software for well over a decade in several industries including education, finance, construction, manufacturing and retail sectors. Raju has a graduate degree in Industrial Engineering from Ohio University. In his spare time you will find Raju reading, or watching movies, or playing with yet another programming language. He is affectionately known as looselytyped on Twitter.

NFJS, the Magazine - April 2012

NFJS the Magazine - April 2012

In this Issue: