Live data from Hacker News

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

m.youtube.com

21–30 of 133 posts

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

#21
post #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 clo…

Yes, but I/O is impure and sequentially dependent, unlike mathematics.

Maybe the "impedance mismatch" between pure-fp and I/O is too great, with the IO monad being the "leaky abstraction" of the FP world.

Then OO is not a bad solution to an irrelevant problem, but a pretty-good solution to a bad relevant problem.

EDIT:

To clarify: The "problem" is change.

Imperative programming relates sequential device-change over time, to sequential programming lines. OO programming is a structured imperative programming.

Pure FP langs model sequential change with (roughly,) lists of actions to-be-performed that are snaked through your program.

(Also: maybe OO's failure has more to do with its limited static analysis, type systems, than its model of change?)

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

#22

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 stron…

> poor design and entangled concerns

good on you to call BS a bit, but others have mentioned management of state specifically.. so "nouns" are ABCs, "verbs" defined, but after runtime for a while, and getting hammered or other difficult conditions, what is state like ?

good OOP can be really useful, without being a religion.. personally I would build general-purpose objects here and there to save some tedious decomposition..and the resulting seperation of code and concerns was fine .. specific things get specific code, while one or two item constructs somewhere off the beaten path might get lumped into a collection of "util" or similar.. its ok - it takes some practice and thinking ..

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

#23

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 stron…

> "this might be the most important video you've ever watched"

This is standard practice on YouTube, for better or for worse - same with the usual appeal "hey, you can help me by liking, commenting and subscribing!" at the end. (I have not clicked on this video, so I have no idea if anything like that is in there too.) Gotta drive those "engagement" numbers!

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

#24

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.…

Functional programming has little impact on performance.

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

#25

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.…

Oop is slower than functional in many cases. The highly optimized java stack isn’t that fast and still uses oodles of memory. And then there’s languages like ruby which are practically slower than writing shell scripts.

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

#26

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 stron…

This advice/reflection could apply equally to any style of programming, except for one particular snippet. You haven't made or refuted any OOP-specific claims. Separation of concerns? Egotistical soapbox speaker? Strong domain layer? What do they have to do with OOP, as opposed to just P?

Except for this: > favor composition over inheritence

Yes! Inheritance is OOP-specific, and I agree that you should avoid it.

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

#27
post #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 clo…

Yes, but I/O is impure and sequentially dependent, unlike mathematics. Maybe the "impedance mismatch" between pure-fp and I/O is too great, with the IO monad being the "leaky abstraction" of the FP world. Then OO is not a bad solution to an irrelevant problem, but a pretty-good solution to a bad relevant problem. EDIT: To clarify: The "problem" is change. Imperative programming relates sequential device-change over t…

Mathematics is sequentially dependent. Try 3/4==4/3 for a trivial example

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

#29

Earlier quoted context omitted.

Yes, but I/O is impure and sequentially dependent, unlike mathematics. Maybe the "impedance mismatch" between pure-fp and I/O is too great, with the IO monad being the "leaky abstraction" of the FP world. Then OO is not a bad solution to an irrelevant problem, but a pretty-good solution to a bad relevant problem. EDIT: To clarify: The "problem" is change. Imperative programming relates sequential device-change over t…

Mathematics is sequentially dependent. Try 3/4==4/3 for a trivial example

3/4==4/3? Please explain.

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

#30

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.…

[deleted]
Post reply on HN