Object-Oriented Programming: A Disaster Story

What is Object-Oriented Programming?

Encapsulation = managing state

Even if you don’t have concurrency, I think that large objected-oriented programs struggle with increasing complexity as you build this large object graph of mutable objects. You know, trying to understand and keep in your mind what will happen when you call a method and what will the side-effects be. —Rich Hickey (inventor of Clojure)

OO makes code understandable by encapsulating moving parts. FP makes code understandable by minimizing moving parts — Michael Feathers @mfeathers.

Encapsulation = associating behaviors with data

  1. Unlike objects, plain functions don’t have to be managed and orchestrated into all the places they get used.
  2. Restructuring functions requires restructuring data much less often than when moving methods between classes.

Design paralysis

--

--

--

Programmer of stuff. Youtuber of programming education videos (http://t.co/87idIfrXBA). Him who eats time.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Brian Will

Brian Will

Programmer of stuff. Youtuber of programming education videos (http://t.co/87idIfrXBA). Him who eats time.

More from Medium

5 simple changes that will make your life 10X more enjoyable

Looking back on the last year

AMAL AT A GLANCE

Buying a Home in Kitsap County WA | Top 5 Mistakes to Avoid