News for hackers. Stuff that matters.
Re:The Repeated Deaths of OOP (2015) by ncmncm on Sunday June 06, 2021 @08:22AM (#27412658)
Somebody else invented it. Kristen Nygaard, in particular. He identified the three elements.

It is common, when you steal an invention, to insist it is wholly natural, so not really any sort of invention at all. Saying it does not make it true. There was a time before; Kay came after.

Re:The Repeated Deaths of OOP (2015) by Rochus on Sunday June 06, 2021 @08:30AM (#27412705)
Kay is said to have coined the term "object-oriented", but his conception of object orientation differs considerably from that of Dahl and Nygaard as well as from all current OO languages. Dahl and Nygaard invented the first object-oriented programming language (Simula 67) but didn't use the term. And yes, active objects reacting to messages (events) passed to them were already part of Simula I (1962).

The referenced article - like many others - moreover quotes Kay incompletely; Kay in the sentence next to the one quoted in the article said "the important thing here is that I have many of the same feelings about Smalltalk"; see https://www.youtube.com/watch?v=oKg1hTOQXoY&t=633s. Smalltalk-76 and 80 (in contrast to Smalltalk-72) implement inheritance and virtual methods as it was done in Simula 67, just like C++ and Java do.

Re:The Repeated Deaths of OOP (2015) by locallost on Sunday June 06, 2021 @09:46AM (#27413103)
He has been pretty clear in giving a lot of credit to the inventors of Simula, but that at the same his ideas derive more from Lisp. He even has a Quora answer where he explains that Lisp is the greatest language because he views it as a big shift in thinking.

There is also a well known clear answer of his to the question of what is OOP to him. We ended up with something different in real life, but it's pretty silly to accuse somebody of stealing an idea and giving it a name, when they wanted to do something else. If anything, the name OO was "stolen" to refer to something not originally intended. But even in this case the word steal is too harsh, and your general style leaves a really bad impression.

Re:The Repeated Deaths of OOP (2015) by ncmncm on Sunday June 06, 2021 @01:57PM (#27414901)
On some people, Alan Kay's territorial claims to others' ideas leave a bad impression. Nobody begrudges him (with Dan Ingalls) Smalltalk, which represents a serious material improvement over Lisp syntax. But it looks like sour grapes to complain about C++, a language designed by a grad student of Kristen Nygaard that found success in industrial applications.

Practical reasons for that success—independent programs that run at native-machine speed, using native-machine data representations, and intimately compatible with an existing, successful industrial language—were chosen with careful deliberation, leaving certain Lisp strengths—particularly, function literals—aside, for later. It seemed like the right approach, at the time, and turned out to be.

Java could have been the practical Smalltalk, but its designers elected instead to ape superficial details of C++, for no defensible reasons, to Java's detriment.

The good ideas in Smalltalk have not had much effect on the world. All of Smalltalk's weaknesses were inherited directly from Lisp, leaving it with no better prospects than Lisp has had, or has, for identically the same reasons. But it turns out the "object orientation", like any other exclusive organizational principle, is an inadequate basis for a language meant for broad use. So, C++ supports OO and other styles, and even Java has begun to branch out.

Subsequent development of C++ has drawn mainly upon ML, fleshing out support for other organizational styles that Smalltalk and Lisp never attempted. And, it got lambdas, after all.

Re:The Repeated Deaths of OOP (2015) by locallost on Sunday June 06, 2021 @02:49PM (#27415289)
I've seen a couple of his talks and read some of his comments here and elsewhere. I've never seen any territorial claims, quite the opposite. Can you give me an example?
Re:The Repeated Deaths of OOP (2015) by gnufx on Sunday June 06, 2021 @03:18PM (#27415510)
Indeed. He's said that Sutherland invented OOP (along with the other things Sutherland "didn't know was difficult"). Like most people, I guess, I found out about Sketchpad from Kay.
Re:The Repeated Deaths of OOP (2015) by ncmncm on Sunday June 06, 2021 @08:33PM (#27417706)
Kay has promoted many different definitions of "object-oriented", over the years, and many disjoint variations on Smalltalk's early history. It is probably best to stick to the very oldest interviews if you care to learn the real history.
Re:The Repeated Deaths of OOP (2015) by locallost on Monday June 07, 2021 @03:47AM (#27420106)
I don't come here to bicker, but I would like to see an example of a "territorial claim" you mentioned. For now it seems that when questioned about specific examples to your claims, you revert to some more unrelated claims.
Re:The Repeated Deaths of OOP (2015) by kazinator on Sunday June 06, 2021 @04:46PM (#27416170)
> were chosen with careful deliberation

In actuality, it went probably closer to: "I'm gonna make a textual preprocessor for C that gives it Simula-like classes, for shits and giggles".

Re:The Repeated Deaths of OOP (2015) by ncmncm on Sunday June 06, 2021 @07:32PM (#27417362)
C++ was never at any stage a preprocessor.

It was, instead, the first of what became many, many compilers that generated C from its AST as the target assembly language, relying then on the C compiler's optimizer and machine-code generator.

Nowadays, LLVM IR fills exactly the role C once did, for new languages like Rust and Zig. Zig is just now in the middle of transitioning to its own optimizer and machine-code generator.

Preprocessors were also common at the time, e.g. m4, Ratfor, and Cpp ("C preprocessor", which initially was a separate program), so it is not surprising that Cfront was mistaken for one, back then.

That is not a reason to repeat the falsehood.

You don't get a runaway success for four decades by accident.

Re:The Repeated Deaths of OOP (2015) by kazinator on Sunday June 06, 2021 @08:57PM (#27417857)
> generated C from its AST as the target assembly language, relying then on the C compiler's optimizer and machine-code generator.

That qualifies as a preprocessor to me.

You can get the sources to it, as late as 3.0.3 from 1994 here.

http://www.softwarepreservation.org/projects/c_plus_plus/ind...

Re:The Repeated Deaths of OOP (2015) by ncmncm on Monday June 07, 2021 @12:01AM (#27418878)
If "preprocessor" means anything at all, it means a program that alters incoming text according to textual rules, without analyzing language semantics. The C preprocessor operates strictly on text patterns. Likewise Ratfor. Likewise m4.

Otherwise every compiler is a preprocessor, and the word is meaningless. Making words meaningless could be a way to make yourself feel important, but it does not advance understanding.

Since Cfront, up until LLVM, almost all new-language compilers emitted C code. They were not preprocessors. Compilers that emit LLVM IR are also not preprocessors.

Re:The Repeated Deaths of OOP (2015) by kazinator on Monday June 07, 2021 @02:16AM (#27419575)
Of course, something using C as a target language can be a substantial compiler. But not everything that outputs C is in the special category of taking "C with classes" to "C without classes".

My root comment is strictly about the initial impetus and proof-of-concept implementation, not ISO C++20.

Oh look, here is a quote from Stroustrup's HOPL paper about the history of C++:

In October of 1979 I had a pre−processor, called Cpre, that added Simula−like classes to C running and in March of 1980 this pre−processor had been refined to the point where it supported one real project and several experiments.

I think, if it's okay for Stroustrup to say "preprocessor" (and even put "pre" in the thing's name), it's okay for me.

Re:The Repeated Deaths of OOP (2015) by ncmncm on Monday June 07, 2021 @02:48AM (#27419768)
Terminology has stabilized, since. Cpre parsed and analyzed C-with-classes code, and synthesized C code just like any of the later compilers, and Cfront.