HackerTube

Object-Oriented Programming is Bad

Brian Will13 HN recommenders · recommended in 9 months, 2016–2025
YouTube
commentary · intermediate · evergreen · 2016–2025 on HN

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.

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

12 comments from Hacker News

@jmulho2019-12 · in “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 opinion is out there. That being said, it would probably be hugely beneficial to read a few of those books and then watch a few of Brian's videos (he has three or four on the topic) and sort out your own opinion. Also, Brian's other (not controversial) videos (dozens) are excellent for learning about programming. Also, Steve Krug's Don't Make Me Think is a keeper. I thought of it last night when I was checking out at a store. I stuck my debit card into the thing, entered my PIN number, then clicked the big blue button that said "Skip PIN". The woman behind the counter said "don't worry about it; everybody does that!"

Strongly recommends View on HN
@ryanmarsh2017-11 · in “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

Strongly recommends View on HN
@cutler2024-11 · in “99 Bottles of OOP now available in Python”

OOP is an industry of its own which generates a ton of incidental complexity. See "Object-Oriented Programming is Bad" by Brian Wills ( ▶ this video ) and most of Rich Hickey's excellent videos, especially his keynote at Rails Conf 2012 where he basically told the Ruby crowd they're doing it wrong ( link ).

Recommends View on HN
@_dain_2023-12 · in “C Object Oriented Programming (2014)”

This video has a pretty good breakdown of how the "encapsulation" and "decoupling" promised by OOP is mostly a mirage: ▶ this video

Recommends View on HN
@zamalek2022-03 · in “.NET Myths Dispelled”

Here's a really popular video that touches on many of the contentions: ▶ this video My personal tipping point was the realization that OOP forces you to first figure out how you solution maps to OOP, before figuring out (or iterating on) how it maps to code. It creates nothing more than accidental complexity: link

Recommends View on HN