Object-Oriented Programming is Bad

Brian Will · 2.6M views · 2016 · 44:35

Open on YouTube

Software architecture & designProgramming language designcommentary

Why Hacker News recommends it

HN returns to it as the go-to critique of OOP, recommended for explaining the costs of abstraction better than most written arguments.

What it is

Brian Will makes the case for procedural programming over object-oriented programming, arguing that OOP's promised encapsulation and decoupling are largely illusory. He analyzes real code examples and the problems of tying data to behavior in classes.

Recommended by 13 HN commenters across 9 different months, 2016 to 2025.

What Hacker News said

Strong rec ryanmarsh · 2017-11 · on “When I use classes, when I don’t, what I do instead and why”

Code should be written first and foremost for humans to understand, and incidentally for compilers to understand. [LINK] If we can all agree about that then we have to ask ourselves if encapsulating data and behavior at the granularity of classes makes the most sense for human comprehension. In naive OO examples (Animal -> Cat) it does. In practice however, it's debatable (at best). I highly recommend this video by Brian Will who does a much better job explaining this problem than I could. [this video] Douglas Crockford also does a good job of explaining some of the trouble with classes. [LINK]

Strong rec jmulho · 2019-12 · on “Ask HN: Books you plan to read in 2020?”

Looking at your top priority books I recalled a slide from one of Brian Will's videos on object oriented programming: "Object Oriented Programming is Bad" [this video] . At around the 43:51 he pulls up a slide picturing several of these (and similar) books. Here is a rough quote: "I can tell you from personal experience of having read these books that you don't need to read them. They don't have answers, they aren't going to square the circle, and you are going to waste productive years of your life trying to live up to their ideals." Now that is just one rather controversial opinion, but we are talking about potentially wasting productive years of your life so I wanted to let you know that opini

Recommends thunderbong · 2016-03 · on “Object-Oriented Programming is Garbage: 3800 SLOC example [video]”

Previous videos Object-Oriented Programming is Bad [this video] Object-Oriented Programming is Embarrassing: 4 Short Examples [LINK] I'm watching the 'is Bad' one, and honestly, it rings too close to my experience. Need to think about this a bit more deeply!

Recommends NegatioN · 2017-03 · on “How we secretly introduced Haskell and got away with it”

Prodcedural code can also be well compartmentalized and tested. I was also until recently quite convinced OOP was the only way to go, but I'm seeing signs everywhere that a lot of the design-problems I've met over the past few years are at least magnified by OOP. The abstraction promised by OOP is a good thing, however very few people are able to consistently make good, reusable and maintained abstractions. To the point where it becomes a weakness rather than a strength. I don't want a billion wrapper-objects that obfuscate my code, and makes the surface area of it bigger than it has to be. Often I struggle understanding code more because of how it was separated, than because of the complexi

Recommends hackits · 2017-03 · on “Principles for C programming”

One of the video that can articulate the whole thing better than me is ( [this video] ) It was a long winded written rant. I still use OOP but its more or less glorified name spaces with functions. Today I rather work on procedural code than OOP code. It may have bugs, it may have their own little quirks but its like a old rusted vehicle that still keeps going.

Recommends lazulicurio · 2019-10 · on “Why Isn't Functional Programming the Norm? [video]”

There was an article on state in OOP posted here a few days ago that I found very thought-provoking[1]. The blog post and related youtube videos are pretty interesting as well[2][3][4]. [1] [LINK] [2] [LINK] [3] [this video] [4] [LINK]

Recommends crimsonalucard · 2019-12 · on “Ask HN: Books you plan to read in 2020?”

This isn't about OOP vs. FP. This is about OOP vs. everything else. Rust, Go and javascript are three languages that are moving away from the OOP paradigm. None of those three languages are classified as functional. >Is there some resource you can point to that says in the past when faced with situation X developers tended to use pattern Y, these days that has been superseded with way of doing things Z? No. A general trend is an anecdotal observation. Still a quick google search yielded: [LINK] Take a look at the following video: [this video] While I don't agree with a lot of it, I think it sums up my opinion really clearly. It's not about DP's but because DP's focus around OOP and the video is a

Recommends cxr · 2020-06 · on “Design Principles Behind Smalltalk (1981)”

At the risk of putting readers off by the title, there's a video essay on YouTube called "Object-Oriented Programming is Bad"[1]. It's both thoughtful and thought-provoking, although I don't agree with the conclusion. Steve Naroff (from Stepstone/NeXT/Apple) did a recent-ish set of interviews with the Computer History Museum[2][3] and referenced that video a bit (and extemporized about objects in small parts throughout). Side note: Naroff and Brad Cox are set to present a paper on Objective-C at this year's HOPL[4]. I wish it were as readily available as Allen Wirfs-Brock's JS paper for the same conference[5][6]. 1. [this video] 2. [LINK] 3. [LINK] 4. [LINK] 5. [LINK] 6. [LINK]