Jon's Programming Blog

Functional or Object Oriented JavaScript?

When people are first exposed to JavaScript and its minimal set of tools (functions, objects, prototypes, and arrays), many are underwhelmed. Therefore, in order to “modify” JavaScript to conform to their idea of what it takes to model software solutions, they very often seek out or re-create class-based systems using the primordial ooze.

- Michael Fogus Functional Programming

Of course, the next sentence he softens that quote, I just enjoyed the first part though.

This desire is completely understandable given that in general people will often seek the familiar.

And the big problem is…

The big problem with class hierarchies is that they are created under the assumption that we know the set of needed behaviors from the start. That is, object-oriented techniques prescribe that we start with a hierarchy of behaviors and fit our classes into that determination.

- Michael Fogus Functional Programming

Functional Immutability in JavaScript Notes on Monads, Monoids, and Make Believe