Has C++ aged badly?

twitter logo github logo ・1 min read

The last time I consistently programmed C++ was several years ago.

A few days ago, a developer told me that over the years, new C++ versions have become more and more bloated.

He also said that the primary argument for using C++, execution speed, doesn’t count any more, given languages like Rust are well designed and performant.

What do you think?

twitter logo DISCUSS (10)
markdown guide
 

I think C++ has aged relatively poorly, some other languages have aged worse, but C++ certainly isn't in the "top 10 languages that have aged the nicest" bracket.
Some real standouts that make think that are; digraphs and trigraph operators.
Having 12 different keywords for access modifiers is another standout too.
I could probably think of others, but that's sort of why I think that. (Shrugs)

 

There is a fabulous book called "The Unix Haters Handbook", which is now available as a PDF from the author. Chapter 10 was called C++: The COBOL of the 90s.

I don't think modern C++ has improved its situation since then.

I consider my own project, which is an enormous mostly C++ project. What other modern and mainstream (say in the top 50 on the TIOBE charts) language could it be written in today, if it were to be written from scratch?

The alternative options are not very promising. Alas.

I did say "mostly C++", because there are about 50 languages used to make the application. Some of that being code that compiles as part of the shipping application. Some of that being code used to create the shipping application. But it's predominantly C++.

 

C++ has improved massively with the addition of auto, updated standard library, lambdas and better tools such as clion, clang tidy and Google sanitisers. The language is bloated, because it maintains backward compatibility, but it is the best it has ever been. Compared to other languages, the libraries are fairly terrible, mostly because there are so many which are horribly out of date and inconsistent with each other... But again this has slowly improved over time.

 

Everyone coding in C++ for sufficiently long time will give you an extensive list of features missing/wrongly defined/needless & conflicting. The truth is that while C++ will never be the coolest & freshest language it gets the work done both efficiently and effectively.

 

I think C++ lives up to the old adage: with great power comes great responsibility. I, personally, never cared for the language. It has an incredibly extensive list of features which means you'll never find two developers writing the same solution the same way. As someone who values readability, I think that causes the language to age poorly. That said, it's still quite alive and well—especially in the embedded world as a lot of engineering teams can't afford to migrate 20-year-old control systems to new languages.

 

That seems to be the consensus from all the game devs at least, granted that is a rather specific subset of people.

Its been some years since I coded C++ but even then I didn't exactly feel that anything was missing from the language.

 

I've worked with C++ on and off since the early 90s. In that time I've seen many languages come and go, flirted with a few (Python and Rust, mainly), but last year when it came time to write a new app from scratch there was no hesitation to use C++. Sure, it's huge, it's overly complex, and there's large amounts of it I'll probably never use or understand. But I love it, and it works, and it's fast as hell with a million libraries available.

 

I disagree strongly that new c++ has become more and more bloated. If anything, C++ is in a better place than it has ever been, with a more concise language definition and a better standard library than ever. That said, it is still a beast and the most complex language every so widely used.

As for Rust, well yes, absolutely, 100%.

 
 

Rust is insecure still. There's no reasonable way to bootstrap without trusting some third party compiler binary.

Classic DEV Post from Oct 20 '18

Learning the Granular Details of a Programming Language?

I'm currently reading "JavaScript: The Definitive Guide" and it's a mighty long...

Bertil Muth profile image
Agile coach and developer