Live data from Hacker News

21st Century C++

cacm.acm.org

101–110 of 281 posts

Re: 21st Century C++

#102
Last weekend, I took an old cross-platform app written by somebody else between 1994-2006 in C++ and faffed around with it until it compiled and ran on my modern Mac running 14.x. I upped the CMAKE_CXX_STANDARD to 20, used Clang, and all was good. Actually, the biggest challenge was the shoddy code in the first place, which had nothing to do with its age. After I had it running, Sonar gave me 7,763 issues to fix.

The moral of the story? Backwards compatibility means never leaving your baggage behind.

Re: 21st Century C++

#103
post #79

Bjarne Stroustrup (the creator of C++) is the best language designer. Many language designers will create a language, work on it for a couple years, and then go and make another language. Stroustrup on the other hand has been methodically working on C++ and each year the language becomes better.

Prof. Bjarne's commitment to C++ is beyond comparison!

Re: 21st Century C++

#105
post #94

I want to love C++. Over my career I’ve written hundreds of thousands of lines of it. But keeping up with it is time consuming and more and more I find myself reaching for other languages.

Same here.

>>contemporary C++30 can express the ideas embodied in such old-style code far simpler

IMO, newer C++ versions are becoming more complex (too many ways to do the same thing), less readable (prefer explicit types over 'auto', unless unavoidable) and harder to analyse performance and memory implications (hard to even track down what is happening under the hood).

I wish the C++ language and standard library would have been left alone, and efforts went into another language, say improving Rust instead.

Re: 21st Century C++

#106
post #94

I want to love C++. Over my career I’ve written hundreds of thousands of lines of it. But keeping up with it is time consuming and more and more I find myself reaching for other languages.

You don't 'have' to keep up with the language and I don't know that many people try to keep up with every single new feature - but it is worse to be one of those programmers for whom C++ stopped at C++03 and fight any feature introduced since then (the same people generally have strong opinions about templates too).

There are certainly better tools for many jobs and it is important to have languages to reach for depending on the task at hand. I don't know that anything is better than C++ for performance sensitive code.

Re: 21st Century C++

#107
post #94

I want to love C++. Over my career I’ve written hundreds of thousands of lines of it. But keeping up with it is time consuming and more and more I find myself reaching for other languages.

since -14 or -17 I feel no need to keep up with it. thats cool if they add a bunch more stuff, but what I'm using works great now. I only feel some "peer pressure" to signal to other people that I know c++20, but as of now, I've put nothing into it. I think it's best to lag behind a few years (for this language, specifically).

Re: 21st Century C++

#108
post #97
post #94

I want to love C++. Over my career I’ve written hundreds of thousands of lines of it. But keeping up with it is time consuming and more and more I find myself reaching for other languages.

I've been writing C++ since 1996-ish. Less and less, for sure. Nothing the past few years. They killed it.

If you only read HN, you would think C++ died years ago.

As someone who worked in HFT, C++ is very much alive and new projects continue to be created in it simply because of the sheer of amount of experts in it. (For better or for worse)

Re: 21st Century C++

#109
I was an extreme C++ bigot back in the late 90's, early 2000's. My license plate back then was CPPHACKR[1]. But industry trends and other things took my career in the direction of favoring Java, and I've spent most of the last 20+ years thinking of myself as mainly a "Java guy". But I keep buying new C++ books and I always install the C++ tooling on any new box I build. I tell myself that "one day" I'm going to invest the time to bone up on all the new goodies in C++ since I last touched it, and have another go.

When the heck that day will actually arrive, FSM only knows. The will is sort-of there, but there are just SO many other things competing for my time and attention. :-(

[1]: funny side story about that. For anybody too young to remember just how hot the job market was back then... one day I was sitting stopped at a traffic light in Durham (NC). I'm just minding my own business, waiting for the light to change, when I catch a glimpse out of my side mirror, of somebody on foot, running towards my car. The guy gets right up to my car, and I think I had my window down already anyway. Anyway, the guy gets up to me, panting and out of breath from the run and he's like "Hey, I noticed your license plate and was wondering if you were looking for a new job." About then the light turned green in my direction, and I'm sitting there for a second in just stunned disbelief. This guy got out of his car, ran a few car lengths, to approach a stranger in traffic, to try to recruit him. I wasn't going to sit there and have a conversation with horns honking all around me, so I just yelled "sorry man" and drove off. One of the weirder experiences of my life.

Post reply on HN