4 ms·
Summary: I don't understand programming much, I don't understand OO, I don't know how to do OO properly, and so I think OO sucks. This article is Not Even Wron
by swombat 18y ago
Summary: I don't understand programming much, I don't understand OO, I don't know how to do OO properly, and so I think OO sucks.
This article is Not Even Wrong. It's not close enough to even being wrong to warrant a thought through response. The author needs to go and learn how to do OO properly before making wild declarations about "Why OO sucks".
================
Edit: worth clarifying this as I've just realised that this guy is supposed to be the author of a programming language (quite worrying if he is!)
As I said, this is too far from even being wrong to be worth really debating point by point, so I'll just poke a few holes to demonstrate that I'm not just flaming:
1) functions and data structures belong in totally different worlds
Anyone who's even glanced at SICP knows that the distinction between data and functions are vague at best. Certainly they are tightly coupled concepts.
------------
2) Functions are understood as black boxes that transform inputs to outputs. If I understand the input and the output then I have understood the function. This does not mean to say that I could have written the function.
How does that have anything to do with the age of the captain? Not only the author's main point doesn't make sense, but he feels the latitude to make tangents about unrelated things that don't really have an impact on his obviously controversial main point.
--------------
3) The "time" example that he gives...
In this example, he basically creates an ad-hoc object made of methods that return data. The only difference between this and proper OO is that this structure doesn't benefit from all the advantages of OO. But it's still a tightly coupled structure made of data (the values) and functions (the methods to access those values).
--------------
4) In an OOPL data type definitions belong to objects. So I can't find all the data type definition in one place. In Erlang or C I can define all my data types in a single include file or data dictionary.
So now language design should be driven by whether you have a decent editor that allows you to manage more than 1 file? Seriously, the "Everything in 1 file" anti-pattern is not even worth arguing about... When someone makes such a dumb point, how can you take the rest of the article seriously?
--------------
I could go on, but I think I'm proven my point. Either this article was not written by Joe Armstrong, or it casts severe doubt on the sanity of Erlang, or he's written it to troll the OO community.
- jwilliams 18y agoAgreed. Most of his reasons are straight tautologies - "Here is my definition of XYZ" - then, see how coincidentally that definition clashes with OO?
- ananthrk 18y agoThe said author is Joe Armstrong (of Erlang fame)
- swombat 18y agoYep, I just got that and updated my post to include argument supporting my point. Inventing a language doesn't preclude you from being sorely wrong.
- ananthrk 18y agoAgreed. Not knowing the author is all the more better as the response will be not clouded by "OMG, he created Erlang :)"
- jmtulloss 18y agoAt the same time, Erlang handles its problem domain like a champ. Knowing that this was written by Joe Armstrong, you can see that he might be approaching this from a different angle than others, even if he is lacking in eloquence here. I would tend to agree that OO is pretty bad for highly parallel programs, which makes this all seem a bit more reasonable.
- gaius 18y agoMeanwhile Erlang is dominating C++ in its niche. Coincidence?
- swombat 18y agoI haven't heard of any games or embedded systems written in Erlang...
- albertcardona 18y agoI know OO rather very well. My opinion: works great for GUIs. As I was reading the article, I could recall moments from my past experience agreeing with every single point the article is making about OO. The article neatly summarizes most of my grievances with Java the language. And only someone with plenty of experience with OO could have made such a succinct summary.
- ricky_clarkson 18y agoI wonder whether Functional Reactive Programming might work better.
- access_denied 18y agoYou mean like in the original Asymetrix Toolbook, the earlier versions of Macromedia Director or Future Splash? I would say: yes.
- daleharvey 18y ago#1 just because its a fuzzy distinction does not mean a distinction should be attempted, the comments about binary trees is useful here #2 thats a core concept behind functional programming thats seperate from oo, most people dont realise that with object methods, the object is an input to that function, not just its parameters I explained on irc for #3, but for everyone else, those type specifications are not data structures, there is no coupling nor any methods invoked, they are purely type specification that describe the datatype, useful for (optional) static type analysis and documentation, they arent equivocal to typedefs, which are datastructures (those are records in erlang). #4 it is not everything in one file, it is everything related in one file, again this is just the ability to separate the data from the function that act upon it It might be worth taking a second to see if you actually understand the points he is making as opposed to attacking them, before you edited in the counter arguments this was just an ad hominem attack.