Some programmers actually hate OOP languages? WHAT?!

Started by
91 comments, last by Washu 9 years, 2 months ago

I've successfully implemented MS COM objects in assembly language. smile.png

Like the C++ classes they're based on, they're nice to implement, but a bit bulky... (although that's probably my fault, because the C++ compiler probably does a better job at optimizing machine code than I do). I did find a way to implement virtual method thunking using one less "jmp" instruction than the C++ compiler. biggrin.png

(This is not a joke.. really!)

If the future of MS are the metro-type and unified apps they're bragging about, I'm gonna miss this.

Advertisement


Now I did not fully hear what he was saying, because I tuned in to the stream a bit late, so I missed the beginning of his talk.

Just as a small note, all the streams are archived on YouTube (usually it's up roughly a day after the stream is done):

https://www.youtube.com/user/handmadeheroarchive

If you miss parts of a stream or want to watch a particular episode again, they're all there.

Hello to all my stalkers.

There is great blog entry where Casey is explaining his coding style.

http://mollyrocket.com/casey/stream_0019.html

a lot of text


I had a bit of déjà vu when I read that and after going back through your old threads I learned why. Back in 2012 you made a thread that's very similar: extremely low on facts but lots of strong opinions, tons of pathos and a good dosage of completely wrong. And the same religious prosecution reference.
My personal advice would be to drop that religious prosecution stuff first. It just screams "nutcase". Unless you really actually believe it. In that case I would advise professional help.

I was pondering for a bit whether I should try to talk about whatever facts (or supposed facts) I could find in your posts but then decided against it. There is so much hyperbole and pathos in it, I really don't want to read it a second time in the hope of finding something to work with. Besides, I'm fairly certain the bug I was hunting is fixed now and I just won't have the time while I wait for my processing step to run through.

In my experience, people who "hate on" OOP fit into these groups:

1) The old guru. You've been programming the same way since 1983 and you resist change. You're proficient in procedural C, or FORTH or FORTRAN and you see no reason to learn anything else.

2) The elitist. You use your choice of language as a filter to form an exclusive club. You feel that 10% of people who program in X are bad programmers, but 90% of people who program in Y are bad programmers. Therefore you must shun Y, in order to keep the bad programmers away from your club.

3) The enterprise defector. You've been raised on Java in a large company, and have been forced to write one too many SolutionFactoryAdaptaorPatternVisitorFlyweightProxyFactoryProviders and other wtfs, with coworkers who buy into this tripe, probably just for political gain within the enterprise.

4) The tried it once-er. You tried learning C++/Java/SmallTalk back in 1998, wrote tonnes of inheritance trees, realized your code was terrible, and decided to forever shun this thing that you barely understood in the first place.

5) The old-school optimizer. You wrote a better version of virtual in C 20 years ago, so now shun all C++ compilers, even though you've never bothered to re-run your tests with modern compilers. You're probably also an old-guru.

6) The hardcore game-dev. You actually understand all the points being made in Mike Acton's rants, and therefore you subscribe to point #2 -- you're sick of seeing bad programmers write bad code, so you want to take away the tools they're abusing.

And he was talking about OOP and how bad it is.

If anyone is making rash, absolute statements like that, then they should not be teaching other people.

There is great blog entry where Casey is explaining his coding style.
http://mollyrocket.com/casey/stream_0019.html

That falls into the straw-man argument category. To paraphrase:
"I don't understand OOP, so based off the badly taught perversion of it that I was using, I'm going to declare that it's all horseshit."

The big staw-man there is he bases all the opening paragraphs on an example where a problem is solved using a faulty inheritance hierarchy, implying that this is the OO way to do things... when in fact OO teaches the opposite of this -- to prefer composition over inheritance -- and thus the opening paragraphs are either ignorantly or deliberately presenting a terrible and/or contrived solution to generate a false impression.

All the ideas he's putting forth in that post can be combined with the useful ideas from OO theory... i.e. they're mostly orthogonal.

It's very arrogant to just dismiss it (and harmful to teach such arrogance to others) because you had a bad experience in the past.


Now I did not fully hear what he was saying, because I tuned in to the stream a bit late, so I missed the beginning of his talk.

Just as a small note, all the streams are archived on YouTube (usually it's up roughly a day after the stream is done):

https://www.youtube.com/user/handmadeheroarchive

If you miss parts of a stream or want to watch a particular episode again, they're all there.

Yah I know. But when he was talking about OOP he didn't start recording the video yet. It should be up on twitch past broadcast. I should re-watch that.

-----

You know, this thread is an eye opener for me. Honestly just reading through the thread and all the links provided by you guys, I'm actually started to get anxious. Its like when I was a kid and some teacher starts screaming at me for doing something wrong, when I didn't know it was wrong, and instead of teaching me that this is the wrong way of doing things, they just keep screaming at me and telling me how stupid I am (probably not a good teacher to learn from him, but still).

After reading this thread, I'm honestly more scared to share my source code with the public than ever. Because I might be doing something stupid and someone will just come along and start bashing me for writing shit code. Problem is, I will never learn the right way to code from the wrong way if I don't share my code and no one explains it to me.

I don't know......

And he was talking about OOP and how bad it is.

If anyone is making rash, absolute statements like that, then they should not be teaching other people.

More like, if anyone is reducing a quote to an absolute statement, you better not believe it before going to the source first. I'm not even sure what was quoted there, but from what I read/listened of Casey, he does not make such absolute stamements, even if he does say he mostly codes in a different way.

And he was talking about OOP and how bad it is.

If anyone is making rash, absolute statements like that, then they should not be teaching other people.

More like, if anyone is reducing a quote to an absolute statement, you better not believe it before going to the source first. I'm not even sure what was quoted there, but from what I read/listened of Casey, he does not make such absolute stamements, even if he does say he mostly codes in a different way.

Your probably right. I might have actually miss quoted him. But I wasn't just talking about what Casey said, I was generalizing that some programmers do hate OOP. I will actually re-watch the beginning of the broadcast and post the link.

For the record. I do enjoy watching his stream. He has been very educational, and I have learned a lot from his videos/stream,

http://dataorientedprogramming.com

- compilation of DOD articles and videos

DISCLAIMER: I probably fit into several of Hodgman's categories. smile.png

I happen to not like OOP, but it's not because of objects: It's because of the second "O". I understand and use objects regularly, but I don't find it healthy to orient your programming towards a particular tool. The name of the paradigm implies that you need to buy into it completely and you can't write any code outside of methods for classes.

There are certain types of programs for which OOP might be a perfectly good solution (making GUIs comes to mind). It so happens that most of the programs I like to write (board game AI is the main example) don't benefit a whole lot from structuring things into objects. For instance, when writing a chess engine there isn't much to be gained from having objects representing the pieces, the squares on the board or the players: For the most part you can use enums or even small integers to identify all those things. For higher-level concepts (the board, a game, an opening book, a transpositions table, an engine...) objects are generally a good fit.

The main strength of objects, in my opinion, is in defining clear interfaces between parts of the code. And that's primarily what I use them for.

This topic is closed to new replies.

Advertisement