logoalt Hacker News

andrewl-hntoday at 3:36 PM2 repliesview on HN

Something that not many people consider. It is almost certain that C++ "saved" C by existing. Without C++ there would be an enormous pressure to add more features to C itself. One reason why C committee could get away without adding much over the years was that they could nod towards C++ and say "that's their job, not ours". And if later didn't exist who knows what kind of language C would become. Classes? Templates? Lambdas? We can only speculate.


Replies

Maxatartoday at 4:37 PM

I don't know if this is true. In the 80s there were many languages that were C with additional features or C preprocessors that added and experimented with features similar to cfront. You had OOPC (object-oriented pre-compiler), Objective-C, C*, Concurrent-C. People were experimenting in all kinds of ways by taking C and trying things out with it.

show 1 reply
WalterBrighttoday at 6:30 PM

> It is almost certain that C++ "saved" C by existing.

Perhaps. But in the 80's, C was the most practical language to use on the PC, by far. And porting C code to other platforms was easy.

show 1 reply