News for hackers. Stuff that matters.
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.