30 years of C++

http://cpp-lang.io/30-years-of-cpp-bjarne-stroustrup/

Pretty interesting interview with Stroustrup. At the end he shares what he is excited about:
I hope to see:
• concepts (already an ISO TS) for better definition of templates
• modules for faster compilation
• an improved STL with ranges (proposal by Eric Niebler)
• co-routines (proposal by Gor Nisharov)
• a networking support library (proposal by Kriss Kohlhoff)
• better support for concurrent and parallel programming
• and more! http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4492.pdf
I'm personally very exicted about modules - I hope they'll do something about the terrible state of linkage.
I myself wouldn't mind a better definition of templates.
TarikNeaj wrote:
I myself wouldn't mind a better definition of templates.
What do you mean? Nobody thinks the syntax is great, but I find it hard to imagine that this would ever be changed.
>What do you mean? Nobody thinks the syntax is great, but I find it hard to imagine that this would ever be changed.

One can only dream.
I'd prefer if templates were weakened in favor of a sane metaprogramming system. Something somewhat like C#'s generics would be alright, although C#'s demand that the parametric types be specified at the point of definition (i.e. what Stroustrup would call a "compile time static type system") makes them very annoying in many situations. You end up having to satisfy two type systems, even though one checks the output of the other. I'll take cryptic error messages over a crippling type system any day.
@helios: that's definitely not going to happen. I don't think that kind of change is even in the far future of C++. It's why I'm (very) slowly designing my own language.
It's why I'm (very) slowly designing my own language.

I'm still waiting!

I know Stroustrup keeps saying he has thought about creating a new language and decided it wouldn't work out (I agree) but I really wish it could happen.

Even on this forum all I see is 20 year old C everywhere. C++ is an amazing language but it seems (almost) no one is using it. I'm sure it annoys Stroustrup more than me though.
James2250 wrote:
C++ is an amazing language but it seems (almost) no one is using it.
It seems more like no one is teaching it - most of the professors teaching C++ seem to have learned it before it was even standardized as C++98, and have since neglected to so much as Google it since then. A professor at my college didn't even know what C++11 was when I asked him. It also doesn't help that many people are scared of C++ or are actively doing the scaring:
Bjarne Stroustrup wrote:
It seems to be a popular pastime to condemn C++ for being a filthy mess caused by rampant design-by-committee. This has been suggested repeatedly since before the committee was founded, but I feel the situation is now far worse. C++ is larger now (especially when we consider the standard library). That, and the variety of current proposals make that accusation credible. It really annoys me when people try to show how clever they are by presenting convoluted puzzles that I think belong in the “It hurts? Of course hitting yourself in the head with a (metaphorical) hammer hurts; so just don't do that!” category. They blame the committee. Such code examples are often used against C++. Not to help people write better software, but to scare people off learning C++. Many of the problems we address using C++ are messy, messier than many are willing to believe, and some of that messiness leaks into the language. Also, we cannot clean up old messes: doing so could break billions of lines of C++ code.

It is far easier to criticize than to build.
I am part of a community of programmers on another forum where most of them like to trash talk C++, so I know first-hand what Stroustrup is talking about. Most of the people there that do know C++ wish they didn't :(
Last edited on
It seems more like no one is teaching it

This. So much this. Have you seen what OCR say about C++ in their what-language-to-use-for-your-controlled-assessment section? I can't find my copy of the pdf at the moment, but they basically gloss over the massive performance boosts over their recommended language (usually python) in order to write about half a page on verbose code, meaningless error messages and an extremely steep learning curve, which I would say is pure fearmongering. It kind of shows the flaws in their thinking in that because I know C++ and haven't learnt python, I was able to easily fix the problems in people's code that our teacher (who's normally a really good teacher and knows python) couldn't find. I'd go as far as saying C++ would be a good educational language once you teach people some theory because it teaches people an actual understanding.
It seems more like no one is teaching it


I have a couple friends who took c++ courses in university, and they were absolute garbage. The class final project was to make an image move from the left side of the screen to the right side of the screen (in a 300-400 level course?!) in the form of a train. Those people would come into the industry and be completely lost.

To be fair, I've become accustomed to the nicer features of some higher level languages and completely understand the push towards learning those instead. Python is ... really spiffy.
Topic archived. No new replies allowed.