• Forum
  • Lounge
  • The Bad Things About Object Oriented Pro

 
The Bad Things About Object Oriented Programming

http://programmingsucks.blogspot.com/2015/01/the-bad-things-about-object-oriented.html

I tend to disagree.

From the numbered points in the article:

1. This is a dislike for data hiding, not a dislike for OOP.

2. I don't even know what this means.

3. The author seems to ignore the existence of C++, or is unaware that some languages can create objects on the stack.

4. The author seems to be complaining about their inability to see into the future, rather than a characteristic of OOP.

From the rest of the article:
In real life, things don't fit into hierarchies.
So what? Programming isn't supposed to be like real life.
OpenAL
What does that have to do with OOP?
Garbage Collection
What does that have to do with OOP?

This seems like a rage article. What do you think?
1. Agreed... this is irrelevant to OOP and in fact, it's possible to achieve data hiding with pretty much any language, including assembly, which aren't a first class OOP language.

2. Not sure as well... I think he's talking about cases like in Java where you cannot have a function that isn't associated with an object, even if that object has no data that it retains. If so, I can understand... it's kinda stupid since there's no information to communicate with. It would really depend on use case but in most cases, even in Java, I find myself considering these cases bad application design rather than a folly of OOP.

3. OOP doesn't care about where the data it's associated with is created.

4. Uh... erm... I'd better not answer this one...

They added traits, mixins, and interfaces to try to fix the initial problem that object-oriented programming had attempted to solve.

"traits, mixins, and interfaces" are not a fix for OOP nor does OOP try to solve these things. traits and mixins are viable for non-OOP-based languages. I don't really see a problem with interfaces, they're a form of data communication.

<codesnip> ...would have sufficed. No magic here.

I don't really get what he's talking about... almost any OOP based language can do along the lines of his example. I don't know what magic he's talking about.

Stuff like hierarchical classes, inheritance, and garbage collection. Why?

I oddly agree. I dislike all of the above and avoid them like a plague... has made code and my life magnitudes easier.

Hierarchies are one of the reasons why I spend too much time planning when writing OO code rather than actually writing code.
I feel like that's more of a lack of experience rather than the fault of OOP. You also do not have to use a class hierarchy at all (including in Java).

Inheritance is just a horrific idea when you really think about it. Exhibit A: A free foundation called 'Uber Codes' writes an audio framework. Another large group writes an interface to that framework to make it available in a different programming language. Your company decides to use that interface. About a year later, out of the blue, 'Uber Codes' sells their audio framework to a large corporation, and the framework is made proprietary. Then, over the next few months, that corporation terminates support for that product. Now you're screwed. You either have to wait for the group that created the interface to write a new back end or switch your entire code base to a new audio framework. For those of you thinking, 'man, that seems like a pretty specific example...', that's because it's actually happened before with a product called OpenAL.
I don't see how that helps his point about inheritance being bad *at all*. I don't recall this ever happening with OpenAL anyways...

I don't like Garbage Collection so I can mildy agree with his comments on GC by skimming over them.
EDIT: Although yeah, GC has nothing to do with OOP and is just as usable in a non-OOP language...
Last edited on
Yeah I read this an laughed. The "problems" he presents are either not specific to OOP or are simply invalid and indicate a sheer lack of understanding of the concepts he's smashing.

there will always be a case where you need to add or replace some functionality. This is why people invented dumb ideas like inheritance and access modifiers, which are pretty much a way of writing spaghetti code in a structured language


I'm not even sure what to think about this... I don't think he could have stated something more backwards even if he tried.

If someone had taken C and added C#-style generics, modules, code outside of functions, scoped enums, and record function attaching (as shown in my prior example), I'd be the happiest programmer ever.


I sincerely hope he's kidding about that one.

He lost the rest of his credibility when I went to his Google+ account and the first post was a comment he had on youtube talking about "government conspired terrorist attacks" being a form of population control.
Last edited on
closed account (z05DSL3A)
Originally 'object-oriented' was a term coined by Alan Kay, the creator of SmallTalk. He defined an object-oriented language as having the following properties...


http://stephane.ducasse.free.fr/FreeBooks/SmalltalkHistoryHOPL.pdf (page 78)
That 'definition' is the design principles behind Smalltalk, nowhere it is implied that they should also serve as definition of Object Oriented. From there on in it just falls apart.
This guy doesn't even know what OOP is. I think this is more of a [poorly constructed] C# rant than something that's actually able to create a semi-productive discussion.

To which I reply, "no shit sherlock, it's conceptual". I say this because I've been banned from chat rooms and forums numerous times by people who are incapable of understanding metaphors or concepts. But I digress...
Gee, I wonder why...

When I read this along with the image linked I literally cringed.

And this...
If someone had taken C and added C#-style generics, modules, code outside of functions, scoped enums, and record function attaching (as shown in my prior example), I'd be the happiest programmer ever.
...

If you didn't want to read the article, the guy is just your typical C elitist (or just a troll, but probably the former).

EDIT: I guess I was sniped by ModShop... I should've read the replies, lol.
Last edited on
Topic archived. No new replies allowed.