"No Littering!" talk slides by Stroustrup


The interesting slides of the “No Littering!” talk by Bjarne Stroustrup:

From slide 44:

Why not a new C+±like language?
• Competing with C++ is hard
• Most attempts fail, C++ constantly improves
• It would take 10 years (at least)
• And we would still have lots of C and C++

C++ code isn’t going away, so it’s a good idea to improve C++ to avoid some of the problems of the present and future C++ codebases.

Bjarne is correct, D language was much better than C++, but in the meantime C++ has improved a lot.


D wasn’t that much better. It was better maybe, but so were java, python, ruby, C# and many others, while it was much worse on being known and have tools for every platform. To large extent D and C++ lost to other languages. They all out-competed C++/D for whole classes of usecases.


Ye, C++ has improved a lot, and the libraries out there are just fantastic(Just go to Facebook’s Github for example).
What to say about Tools support, etc…
I have an internal conflict about dedicating more time to improving my C++ skills or Rust skills…
Currently I basically left any efforts on improving my C++ skills(Note that at my job I write exclusively in C++) and dedicate my time almost exclusively to learning Rust. But modern C++ is So appealing.

Edit: Btw, I was just reading the slides and saw this post… :slightly_smiling:


They want to give modules, concepts, Rust-style memory safety and D-style ranges to C++. And there are tools to sanitize against overflow errors. It’s going to be an interesting language. If C++ becomes good enough, then improving your C++ skills becomes a reasonable idea.


It’s already very good, starting with C++11, C++ is not the language people thought of it before…
In C++17 there will be a lot of threading stuff, I think the most impressive ones are stackless coroutines. If you want to find more about it, search for Gor Nishanov and stackless coroutines, very impressive…
And there are a lot of libraries that are the just the best in the industry(Especially the ones from the likes of Google and Facebook).


Even with the improvements C++ a large package of not so awesome things it brings with it. For example: static initialization, macros, templates (generics are useful but C++ templates are horrible), header files, very fragmented to build code (lots of build systems, etc)


For now I’m betting on rust. Beside fixing many issues C++ has, it has sane development process (no sponsored committees), regular release cycle, easy access to core team, didn’t acquired yet 15 ways of declaring a string, has readable error messages, package manager and generally more unified tooling. This makes it more solid foundation for next 20 years then Frankenstein C++ is becoming. All it needs is couple of good applications to promote it.


I was lurking around for a few days, finally made account haha :smile:. So I just wanted to give my perspective to this discussion since I’m also following both languages closely.

For most of the people who say C++ comes with a baggage of old not-awesome things, just don’t use them. You don’t like macros? I don’t think I’ve used them in last 5 years. You don’t like templates? Man, you’re really missing some good stuff. Templates are turing complete by themselves and in fact I myself wasn’t good fan of them in early days, but as soon as I started practicing, they’re an excellent tool for generic programming and library stuff.
Still if you don’t like it, then just don’t use it. It’s not like your program will crash and burn because you aren’t using a certain feature. They’re language features for a reason :smile:.

Clang tooling is finally getting mature, code-completion works without delay, introduction of rtags have changed everything in area of refactoring, static analyzers prevent almost every noob mistakes, and btw have you seen GSL? And and constexpr is really golden feature. Why wait for runtime if you can do something at compile time only. Not all programs are meant to do things at runtime and its a boon for c++ developers. And I haven’t even talked about modules, concepts, ranges, contracts and stuff that’s already been implemented and coming soon in standards. And finally we have lots and lots of TS as the standard committee calls them, for File System, Concurrency, Networking and things like that. It will take hours to explain everything but a lot have changed and finally developers are writing in C++ and not some C-like language :wink:

I do not want to sound like a language lawyer or something, but at the end of day, these languages are just tools for you. Pick one that suits you. And c++ has that baggage because not everything is shiny new stuff and we just cannot convert all previous code into new shiny stuff. I really hope a brighter future for rust and maybe will use it in a few years when it becomes quite mature, but I can’t just throw away everything I’ve written in some other language, or then there will be a new rust someday. So my decision is to stick with c++ and wait for rust to get more experience and then who knows some other language pops up and I might jump onto that :wink:


I’m sorry but what you are saying here might work for a small new project.

Try working with a large codebase with million lines of code. You can’t just go and don’t use x and y because it’s already used and same for new features. I have seen all of the existing things in C++ old and new cause major issues many times (esp with being “creative” with templates causing major increase in compilation time and code bloat)

I could write pages about it here but I won’t.


If you are working with existing project, I can understand that, but then you have no business looking for other languages and other languages have no business addressing your needs. However there will be always people who start new projects and don’t care about compatibility with several decades old code.


Yeah I’m fortunate enough to not work with something of that scale so maybe you’re right. Anyways I hope best for both languages :smile:


Use microservices Luke :slight_smile:


Yeah. Don’t get me wrong, improvements to C++ is good and will help in some cases but some are hard to retrofit (esp when you rely on many compilers)

Right now (at home) Rust is my language of choice :slight_smile:


Moderator note: A gentle reminder: as always, when discussing other programming languages, please do so constructively. Thanks!