Live data from Hacker News

Object-Oriented Programming is Bad (2016) [video]

m.youtube.com

11–20 of 133 posts

Re: Object-Oriented Programming is Bad (2016) [video]

#11
OOP is a way of thinking about and structuring your program that works well for some problem domains and not for others. Like other paradigms it can become dogmatic and be overused. Also like other paradigms it became a huge fad for a while and now there is a backlash.

Re: Object-Oriented Programming is Bad (2016) [video]

#12

s/bad/unfashionable

Except it's not unfashionable. It's used by millions of programmers who just want to get stuff done. It's used by thousands of companies who don't really care how the native instructions are eventually generated. It's used by individuals and teams, application developers and library authors. This premise of this video is flawed from the beginning and the whole thing is basically a gigantic straw man.

He has reduced OOP to polymorphism/encapsulation/inheritance. Is that what you mean by the straw man?

Re: Object-Oriented Programming is Bad (2016) [video]

#13
post #3

Here's the medium post from the same author that goes with the video: https://medium.com/@brianwill/object-oriented-programming-a-...

This is someone who is confronting basic limits of representation and information flow and blaming OOP. There is no one best way to organize code just like there is no one best sentence to describe a rose.

"There is no one best way" summarizes what I think is a major unheralded realization in software engineering in the past 10 years.

Before that it was the search for the One Way. OOP and functional programming were probably the two biggest opposing schools during that era, but now the trend is languages that easily allow both plus plain vanilla procedural programming. It's the programmer's job to pick a paradigm for the problem being solved.

Re: Object-Oriented Programming is Bad (2016) [video]

#14
The problem for me in regards to OOP is the complexity related to the management of state. OOP encourages mutability and understanding the state of an object as its methods are called can be confusing when additional internal (and often times, private) methods are called. In functional programming, state is something acted upon by functions. It is as simple as f(x) = y. Reasoning in functional programming is much closer to the mathematics I've been trained in since grade school. In functional programming languages, mutability of an object is an explicit operation. It's easy to tell when state is being mutated visually from syntax. Mental overhead is greatly reduced when you can assume that your data structures are immutable.

Re: Object-Oriented Programming is Bad (2016) [video]

#15
You can make any number of arguments why X, Y or Z is bad (or, "considered harmful"). The truth is, if you want to get stuff done, objects often fit the domain well enough and put state in predictable places. A bandaid here or there, "friend" classes and so on may be required. But, you'll get stuff done even if it's not in some perfect stateless beauty.

Re: Object-Oriented Programming is Bad (2016) [video]

#16
post #13

Earlier quoted context omitted.

This is someone who is confronting basic limits of representation and information flow and blaming OOP. There is no one best way to organize code just like there is no one best sentence to describe a rose.

"There is no one best way" summarizes what I think is a major unheralded realization in software engineering in the past 10 years. Before that it was the search for the One Way. OOP and functional programming were probably the two biggest opposing schools during that era, but now the trend is languages that easily allow both plus plain vanilla procedural programming. It's the programmer's job to pick a paradigm for t…

"there is no single development, in either technology or management technique, which by itself promises even one order of magnitude improvement within a decade in productivity, in reliability, in simplicity"

~ Fred Brooks, No Silver Bullet (1986)

Re: Object-Oriented Programming is Bad (2016) [video]

#17
post #13

Earlier quoted context omitted.

This is someone who is confronting basic limits of representation and information flow and blaming OOP. There is no one best way to organize code just like there is no one best sentence to describe a rose.

"There is no one best way" summarizes what I think is a major unheralded realization in software engineering in the past 10 years. Before that it was the search for the One Way. OOP and functional programming were probably the two biggest opposing schools during that era, but now the trend is languages that easily allow both plus plain vanilla procedural programming. It's the programmer's job to pick a paradigm for t…

I'm curious if this is the way older and more established engineering progressed. I would be interested in how, for example, designing and building a bridge to suit a specific use case has evolved over time.

Re: Object-Oriented Programming is Bad (2016) [video]

#18
It is quite obvious to me that the author is ignorant on the history of computing.

The reason of the popularity of OOP is way longer than java, Xerox invented the graphical desktop and ALSO OOP.

When Steve Jobs was ousted from Apple he created NEXT because he believed OOP was the next big thing. It was, and it became the foundation of MacOS X. Microsoft copied Steve Jobs in Windows with MFC. Java copied all of them.

In the words of Steve Jobs, developing in OOP is not faster than not using it. The big difference was once it had been created, it can be reused easily. That was essential for complex systems. It became obvious for companies.

There is this religion today of functional programing, people come to me and say, look how great this is, without state parallel programming is so easy, now you can use 32 processors at the same time. Great!!, until we measure performance and the thing goes 50 times slower. So now you can use 32 processors for what used to take one.

Don't get me wrong, we use functional programming when it is the best tool for the job(it removes lots of bugs), but it is not panacea.

Re: Object-Oriented Programming is Bad (2016) [video]

#19
I've seen this posted here before. I take issue with anyone who gets onto a soapbox and announces "this might be the most important video you've ever watched" and then proceeds to espouse their opinion about something. It's egotistical and it immediately sets up any dissenting opinions as Obviously Wrong. I call BS on all of it. OOP can be written well. I've done it. I've seen it done by others. When you need a strong domain layer and strong data integrity it can really pay off dividends. I think what people are really trying to avoid when they say "OOP is bad" is poor design and entangled concerns. In general favor composition over inheritance, strongly defined data contracts, and a clean separation of concerns (business logic from presentation for instance) and you will find yourself with more maintainable and easier to read code. But thats just like, my opinion man. :)

Re: Object-Oriented Programming is Bad (2016) [video]

#20

It seems the author has not learned how to use OOP appropriately. His main argument can be summed up as “it’s hard to name things and hard to compose things” and that seems to apply to all programming.

I don't think you understood his points.

When he talks about the "kingdom of nouns" he's not complaining that the problem with "Manager" classes is that they're hard to name. Instead, the argument is that these manager classes are hard to name because you've reached a point in encapsulation where the association between behavior and state in inherently unclear and overly abstracted.

I think the author would agree that all programing deals with the difficult problem of composition, however, the argument in this case is that OOP introduces unrealistic constraints on composition. The argument in this video is that encapsulation and the single responsibility principle requires you to choose between a difficult to maintain tree-based object hierarchy, or to abandon encapsulation, and that both of these are sub-optimal choices.

Finally, I think the author would agree that he "has not learned how to use OOP appropriately" but would go one step further and say that "it's impossible to 'use OOP appropriately.'"

Post reply on HN