| ▲ | asa400 6 days ago |
| He literally gives extensive primary source citations to show that the originators of OOP presented this class-domain correspondence as the correct way to think about and do OOP. Bjarne Stroustrup is not just some random guy. |
|
| ▲ | Rochus 6 days ago | parent | next [-] |
| > He literally gives extensive primary source citations to show that the originators of OOP presented this class-domain correspondence In case of Dahl/Nygaard it seems logical since their work focus was on simulation. Simula I was mostly a language suited to build discrete-event simulations. Simula 67, which introduced the main features we subsume under "Object-Orientation" today, was conceived as a general-purpose language, but still Dahl and Nygaard mostly used it for building simulations. It would be wrong to conclude that they recommended a class-domain correspondence for the general case. > Bjarne Stroustrup is not just some random guy Sure, but he was a Simula user himself for distributed systems simulation during his PhD research at Cambridge University. And he learned Simula during his undergraduate education at Aarhus, where he also took lectures with Nygaard (a simulation guy as well). So also here, not surprising that he used examples with class-domain correspondence. But there was also a slide in the talk where Stroustrup explicitly stated that there are other valid uses of OO than using it for modeling domains. |
|
| ▲ | igouy a day ago | parent | prev | next [-] |
| Stroustrup's starting-point (page 13) is abstract-data-types not a compile-time-hierarchy — "Consider defining a type 'shape' for use in a graphics system. Assume for the moment that the system has to support circles, triangles, and squares. Assume also that you have some classes … You might define a shape like this … This is a mess. …" Then — "The problem is that there is no distinction between the general properties of any shape … and the properties of a specific shape … The ability to express this distinction and take advantage of it defines object-oriented programming. … The programming paradigm is: Decide which classes you want; provide a full set of operations for each class; make commonality explicit by using inheritance. … Where there is no such commonality, data abstraction suffices." |
|
| ▲ | igouy 5 days ago | parent | prev | next [-] |
| The source citations are facts. We can check that Alan Kay "The Early History of Smalltalk" shows this on page 82: "Unfortunately, inheritance — though an incredibly powerful technique — has turned out to be very difficult for novices (and even professionals) to deal with." When the presenter tells us — 13:45 "he was already saying he kind of soured on it" — that is not a fact, it's speculation. That speculation does not seem to be supported by what follows in "The Early History of Smalltalk". One page later — "There were a variety of strong desires for a real inheritance mechanism from Adele and me, from Larry Tesler, who was working on desktop publishing, and from the grad students." page 83 And "A word about inheritance. … By the time Smalltalk-76 came along, Dan Ingalls had come up with a scheme that was Simula-like in it's semantics but could be incrementally changed on the fly to be in accord with our goals of close interaction. I was not completely thrilled with it because it seemed that we needed a better theory about inheritance entirely (and still do). … But no comprehensive and clean multiple inheritance scheme appeared that was compelling enough to surmount Dan's original Simula-like design." page 84 |
|
| ▲ | t420mom 6 days ago | parent | prev [-] |
| Is it fair to blame all of OOP for C++? |
| |
| ▲ | throwawaymaths 6 days ago | parent | next [-] | | yes, because java and c# (and others, python to a certain extent) basically copied it. even ruby, which at its core is about "message passing" sure does a hell of a lot to hide that and make it feel c++ ish. i would bet at least 25% of ruby practitioners arent aware that message passing is happening. | | |
| ▲ | JohnMakin 6 days ago | parent | next [-] | | at least python gives the flexibility to opt out of OOP, whereas in java, literally everything is an Object | | |
| ▲ | lisbbb 6 days ago | parent | next [-] | | The main issue I have with Java is that the JVM was built to be portable and then we got a superior kind of portability using containers, which makes the JVM totally redundant and yet whenever I point that out, I get funny looks from people! I guess I have a lot of other problems with Java--jar hell, of course, but also the total inability for corporations to update their junk to newer versions of Java because so many libraries and products were never kept up with and then you get security people breathing down your neck to update the JVM which was LITERALLY IMPOSSIBLE in at least two situations I became involved with. We even tried to take over 3rd party libraries and rewrite/update them and ended up at very expensive dead ends with those efforts. Then, to top it all off, being accused of lacking the skill and experience to fix the problem! Those a-holes had no idea what THEY were talking about. But in corporate America, making intelligent and well-documented arguments is nothing. That's when I finally decided I needed to just stop working on anything related to Java entirely. So after about 15 years of that crap, I said no more. But I'm the under-skilled one. | | |
| ▲ | pjmlp 5 days ago | parent | next [-] | | So redundant that the WASM folks are redoing application servers using kubernetes with WASM containers. | |
| ▲ | imtringued 5 days ago | parent | prev [-] | | You do realize that it's time to sunset a codebase if you can't find anyone to maintain it, right? "LITERALLY IMPOSSIBLE" means the code is dead. It's worthless garbage dragging the company down. There is no nothing else to do except shut it down. Software written in the last century isn't something like an irreplaceable artifact from an ancient technologically superior civilization that can never be replicated. If humanity's technological progress depended on impossibly rare events that never happen again, then humanity would miss the vast majority of them. It would be as if those events never existed in the first place. | | |
| ▲ | JohnMakin 5 days ago | parent [-] | | you realize the person you’re responding to didnt make this decision on what to use in their stack at all and this is likely what eventually happened anyway? |
|
| |
| ▲ | mrkeen 5 days ago | parent | prev | next [-] | | If only! Java gives you just enough non-objects to make pass-by-value or pass-by-reference something you need to be aware of, likewise with == and equals. | |
| ▲ | epr 6 days ago | parent | prev | next [-] | | Everything is an object in Python as well | |
| ▲ | robertlagrant 5 days ago | parent | prev | next [-] | | Literally everything is not an object - to whit: literals. And other things that weren't in your sentence. | |
| ▲ | Spivak 6 days ago | parent | prev | next [-] | | What do you mean by this? Because everything in Python is object, even classes and functions are objects. Do you just mean that Python lets you write functions not as part of a class? Because yeah there's the public static void main meme but static functions attached to a class is basically equivalent to Python free functions being attached to a module object. | | |
| ▲ | lisbbb 6 days ago | parent | next [-] | | OOP is not shoved down your throat with Python, though. With Python, I can choose what taxonomies deserve an OOP treatment and which do not. Spoiler: Almost nothing is a taxonomy of any remarkable nature. | | |
| ▲ | JohnMakin 6 days ago | parent [-] | | you also can get away with completely ignoring the underlying oop semantics in tons of cases whereas java and similar languages dont give you that option |
| |
| ▲ | fc417fc802 6 days ago | parent | prev [-] | | If I call something a function does that mean I'm "doing functional programming" any time I use it? I use both C++ and Python but I wouldn't describe any of what I write as "object oriented". | | |
| ▲ | lisbbb 6 days ago | parent [-] | | No. Functional programming is quite a bit more involved than just writing "functions"--it is taking advantage of the fact that functions are first-class "objects" that can be passed as arguments to other functions, which allows for a far more intuitive and flexible form of programming. But FP is even more than that. |
|
| |
| ▲ | pjmlp 5 days ago | parent | prev | next [-] | | In Python everything is an object as well, unless you are still using Python 1.x, or the legacy mode in Python 2.x. | |
| ▲ | throwawaymaths 6 days ago | parent | prev [-] | | that's why i said "to a certain extent" for python!! |
| |
| ▲ | 6 days ago | parent | prev [-] | | [deleted] |
| |
| ▲ | anp 6 days ago | parent | prev | next [-] | | Maybe not fair, but it’s pretty normal for people to assess paradigms based on their most popular implementations. | |
| ▲ | lisbbb 6 days ago | parent | prev [-] | | I don't hate C++ as much as I hate Java, though. That probably has more to do wit the time I was working with C++ and the kinds of projects versus the mind-numbing corporate back-end garbage I worked on with Java. |
|