8 ms·
I find it interesting that everyone gets so up-beat about the ideology or philosophical debate about objects sending each object messages, hell even not relying
by hackits 10y ago
I find it interesting that everyone gets so up-beat about the ideology or philosophical debate about objects sending each object messages, hell even not relying to a message one object send you until a later date. Without even thinking about concurrency, state, and hell even the basics such as cyclic loops within a event based system!
Though I keep hearing from Alan and other prominent language designers that we still are holding onto this old 1960 mental model of command and control, or structured design concepts. Even some well spoken people suggest that the whole notion of object's are worthless to programmers because it takes place within the notion of classes and constraints of the machine.
This whole philosophical debate about understanding/miss-understanding/correct usage of OOP is just a complete waste of time.
For what its worth I consider object's simply as a basic level category of procedures and data tied to a namespace. If the category requires state then consider it as a object otherwise its considered a module.
I've seen too many project's that have drunken the cool aid and has resulted in 5-10 level deep inheritance tree's with their own branching logic trying to fit behavior to a specific taxonomy.
- optforfon 10y ago"For what its worth I consider object's simply as a basic level category of procedures and data tied to a namespace.“ I mean you're just using different words to talk about the same thing. In your terminology inheritance is just extending a namespace and overloading names. How does that discredit or put into question the "mental model of command and control, or structured design concepts" If anything I feel the failure of OO languages is that they have been afraid of baking in proven design patterns/principles that reoccur over and over (ie. Gang of Four and a few more since then). Yesterday i was staring at some undocumented OpenCV code trying to figure out why there was some pointer that kept showing up in random places. After a very confusing 30 minutes i figured out it was actually the pImpl idiom. Now why do we have to have to reimplement the pImpl idiom each time? why can't this be a keyword?. The amount of code bloat and confusion that a visitor introduces is the prime reason I never use them. (There was an interesting proposal at CppCon 2 years ago that addressed this, but as far as I know it's not gone anywhere) The problem is that the most OO language trace back to C which IS a half-assed language from the perspective of "concurrency, state, and hell even the basics such as cyclic loops within a event based system" and most languages that do OO have been half baked on top of that foundation.
- pjmlp 10y agoI can think of a good list of OO languages that don't have anything to do with C. Also the pImpl is a consequence of C++ not adopting modules and instead rely on C linkers, nothing to do with OOP.
- kabdib 10y agoYup. We were looking at alternate runtimes in some OS / userland projects at Apple in the late 80s. You don't need vtables, and you can do better than static struct layout. You have to do some work at code load-time. C++'s initial lack of a real string type and simple collection types pretty much doomed the language. (Instead they did iostreams? I've been using C++ since early CFront days, and have never used that misbegotten API).
- pjmlp 10y agoI guess I am one of the few people on the planet than enjoys using iostreams when I need to use C++. :) Then again, I never needed to know all their little details. Yeah implementing string, array and collection types was a kind of rite of passage for every C++ developer, back when the compilers were still trying to catch up with C++ARM. I believe appealing to the C culture was one of the reasons those types weren't initially available, as C++ was already considered too bloated by the C community even without them. Nowadays their three major compilers are written in C++.
- kmiroslav 10y ago> If anything I feel the failure of OO languages What failure exactly? OOP has flaws but it has certainly proven to be extremely versatile and adaptable over these past decades since even today, it's still the dominant paradigm to solve modern problems in computing.
- optforfon 10y agoSorry, I mean "drawbacks". One of the reoccurring complaints about OO is that it leads to huge codebases. Lots of articles about how X rewrote some Java program in Y and it's not 10x smaller and 100x more maintainable. This is a consequence of languages being designed to be minimal in terms of keywords - trying to push off as much as possible on to library writers. Unfortunately this seems to have serious limitations and all the boilerplate can't seem to be hidden in library wrappers
- aryehof 10y agoPart of the issue is that people have differing perspectives on computing. One half, see it in terms of computer and data science. For these, data-structures, algorithms and ADTs are paramount. Organization of the problem is through modularity and functional decomposition. An object (as in OO) might be useful for encapsulation, data and implementation hiding, and code organization. On the other hand, there are people involved in business, commerce, industry etc, who need to model concepts, real and abstract, and the complex relationships and constraints between them, into code. For them, an object can be the best way to represent a concept and an OO approach can be the best way to represent how concepts interact with each other.
- hackits 10y agoAgree completly. Kind of the reason why they call it a general pr9gramming language.
- DanielBMarkham 10y agoMy gut feeling is that OOA/D/P will best be remembered as a revolution in analysis, not programming. As a programming concept it's a mixed bag. As an analysis tool I don't think it has an equal.
- llamaz 10y ago> I've seen too many project's that have drunken the cool aid and has resulted in 5-10 level deep inheritance tree's with their own branching logic trying to fit behavior to a specific taxonomy. I don't think you understand Alan Kay's version of OOP, if you think inheritance is a key part of OOP. I was interested in this stuff during the summer and I wrote up the following question/answer if you're interested on what Alan Kay's version of OOP was: https://cs.stackexchange.com/questions/51847/what-is-the-difference-between-abstract-data-types-and-objects/51963#51963 https://cs.stackexchange.com/questions/51847/what-is-the-dif... I answered my own question so I might be wrong, but I have put in a reasonable amount of research effort into it.
- hackits 10y agoNot saying its a key part. Im in the camp you better have a damn good reason to use inheritance that composition will suffice. The whole notion that everyone has their own perspective on oop makes it a mute point.
- pkroll 10y agoActually that's "moot point": http://www.dictionary.com/browse/moot-point http://www.dictionary.com/browse/moot-point But yes, the number of variant perspectives on OOP make it a less descriptive term than would be ideal.
- mercer 10y agoOr a cow's opinion! No but seriously, I think both you and hackits make it clear that there's a lot of discussion over what OOP actually is. Which makes me curious: is there any research on the characteristics of OOP as it implemented in practice across languages? I'd be very interested in such research, because it seems to me that what is possible is often not practiced. So, for example, Ruby might be all about 'message passing' as others, and all the tutorials and books I've read indicate, but in practice it might be indistinguishable from just calling methods on objects, or whatever distinguishes message passing from other OOP styles. If no such research exists, how difficult would it be to scan codebases on Github to analyse this? I might be wrong, but it seems like this would be a worthwhile investigation: how do people actually use languages and what is 'OOP' or 'FP' actually like in codebases that claim to be one or the other. Otherwise we're just getting tangled up in definitions and it's all a moo point.
- mpweiher 10y agoWell, try to remember that for Alan, inheritance is at most an optional feature of OOP, so maybe those "5-10 level deep inheritance trees" aren't as much about people drinking the OOP "cool-aid" as you think.
- hackits 10y agoBoth simual and smalltalk inheritance was added later in the languages history. Yes its optional but it doesnt stop people making a mess of things when they categorise their objects based on data type instead of behaviour
- gnaritas 10y agoNothing can stop bad programmers from writing bad code. Take OOP away from them, and they'll just write bad procedural code or bad functional code; their bad code is not a stain on the paradigm they choose to abuse.
- Retra 10y agoApostrophes do not denote plurality.