Classes, Complexity, and Functional Programming
Kent C. Dodds
2.3K34

Objects (with behavior) make more sense when you want to implement an actor with behavior than recreating the actor with pure functions every time you want to change something about the actor. It’s unfortunate that ‘The most adequate guide’ starts with an example that ‘is not intended to be good Object-Oriented code, mind you, it is here to highlight the perils of our modern, assignment based approach’ (maybe it’s not really the most adequate). Regarding the === quick comparison in functional programming, it can be confusing for beginners; one once told me they were expecting {x: 1} === {x: 1} because they read they could use shouldComponentUpdate like that.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.