4 ms·
Which is why they should be educated, given a chance. No?
by klibertp 6y ago
Which is why they should be educated, given a chance. No?
- xbar 6y agoI read "eradicated." But sure, let's educate them first.
- AnimalMuppet 6y agoKay was a visionary, but not every vision of his was the final word on reality. It's possible that the "mainstream" version of OO is better than Kay's.
- zokier 6y agoIt doesn't really matter if its better or worse. As a term OO means what people understand it to mean. Human languages (unlike programming ones) are descriptive, not prescriptive.
- dragonwriter 6y ago> As a term OO means what people understand it to mean. I would suggest that if you asked people to define the term, Kay’s definition would likely be the single most common (even after normalizing variations in wording). It would still only be a plurality, sure, but the remaining majority doesn't share a common understanding, either.
- klibertp 6y agoYes, though I believe knowing about him and his vision can be helpful in understanding the evolution of OOP and its current mainstream incarnations. Basically, "those who don't know history are doomed to repeat it", "history repeats itself as a farce", and all that... :)
- inopinatus 6y agoIt’s possible that I’m a teapot.
- weatherlight 6y agoIt’s possible that I’m a coconut.
- DonHopkins 6y agoIt's possible that weatherlight is a teapot and inopinatus is a coconut!
- inopinatus 6y agoYou can make a teapot from a coconut.
- astrange 6y agoThe mainstream version of OO is actually quite bad though. You can think of it as just being functions where the first parameter is to the left of the function name. It has a few more features than that of course, but all of these increase complexity and therefore bugs, and it doesn't have any features that reduce bugs. An example would be non-fragile ABIs (ObjC has this, C++ doesn't) or typestate/built in state machines (so you can't call methods if the object is in an invalid state for them). There's encapsulation at least, it's a start.
- thu2111 6y agoIt's pretty clearly not bad, given how many successful languages use it. Java, C#, C++, Kotlin. Windows, macOS, KDE, GNOME. They're all mainstream OO and for good reasons. Fragile ABI is basically a C++ problem. Java has had a stable OO ABI for 25 years now. The .NET ABI has gone through a few iterations, but is stable now. Of course Microsoft also had COM, which is/was a stable OO ABI accessible to many languages including C++ and was arguably just a subset of the C++ ABI without templates. In the AOT compiled work Swift now has a stable OO ABI (sort of). Rust is interested in getting one. Lack of a stable ABI is not an OO problem but more a problem of languages that are designed to compile ahead of time to native code and use native formats as their primary artifact format. Most features OO has reduce complexity and bugs, that's why people use them. There's no comparison between a clean OO API and the de-facto standard state before that, e.g. POSIX, Win32, Carbon.
- pjmlp 6y ago> Of course Microsoft also had COM, which is/was a stable OO ABI accessible to many languages including C++ and was arguably just a subset of the C++ ABI without templates. Why the past tense, when COM is the main way Windows APIs have been introduced since Windows Vista, as COM took over Longhorn OO ABI ideas? Nowadays we just call it WinRT.
- thu2111 6y agoRight, Microsoft don't talk about COM anymore. I haven't kept up much with Windows programming so lost track at some point of what their current-gen tech is and how it works. WinRT isn't just COM is it. It's custom languages, new app metadata formats and stuff. I don't see IUnknown in any modern Windows code samples.
- jghn 6y agoI agree w/ your sentiments here, but it is worth keeping in mind that Simula predates Smalltalk and could be viewed as both the first OO language and the progenitor of what became mainstream OOP.
- klibertp 6y agoYou're right. I'm constantly surprised how much of the history of programming I'm still missing, despite trying to learn as much as I can about it. The feature set of Algol blew my mind when I first learned about it, for example - and now I see I need to take a closer look at Simula, which was developed as a superset/extension of Algol. Learning about that is fascinating and really puts the "language wars" of today into perspective.
- jghn 6y agoBTW I saw you mention class oriented vs object oriented elsewhere and I do think that captures the difference pretty well, thus why I agreed with your sentiments. The actor model basically is object oriented programming in that context, whereas what most people mean winds up being class oriented. There's (at least) a third model IMO from CLOS & friends, such as Dylan, S4, and I'd argue Haskell Typeclasses. Not sure what I'd call it but it's the idea where you define data classes, generic functions, and then provide linkages between those data classes and the generic functions to give you methods on the state
- klibertp 6y agoYes, generic functions and multimethods are one solution to the expression problem, and they're pretty different from Smalltalk-like OOP. It's a shame they aren't more widely adopted - I think only Julia, Nim, and Clojure have them as a feature. Actually, if not for some historical accidents, we could have Dylan in place of Java today... I sometimes dream about such a world: functional core, CLOS-like generic functions and multimethods, sane multiple inheritance, syntax-case-like macros, native AOT compiler, sane module system... OpenDylan - the implementation I played with - is slow as molasses, but with even a tiny fraction of the work put into Java it could be made fast enough to rival C++. It's one of the most striking wasted chances in the history of programming.