Live data from Hacker News

21st Century C++

cacm.acm.org

141–150 of 281 posts

Re: 21st Century C++

#141
post #134
post #131

Earlier quoted context omitted.

I’ve been using c++ since the late 90’s but am not stuck there. I was using c++11 when it was still called c++0x (and even before that when many of the features were developing in boost). I took a break for a few years over c++14, but caught up again for c++17 and parts of c++20... Which puts me 5-6 years behind the current state of things and there’s even more new features (and complexity) on the horizon. I’m suppor…

It’s okay to be a few years behind the standard, the compilers tend to be as well.

Yeah, the issue is more that the perceived complexity means I’m less interested in investing time to catch it all back up

Re: 21st Century C++

#142

Earlier quoted context omitted.

I have used auto liberally for 8+ years; maybe I'm accustomed to reading code containing it but I really can't think of it being a problem. I feel like auto increases readability, the only thing I dislike is that they didnt make it a reference by default. Where do you see difficult to track down performance/memory implications? Lambda comes to mind and maybe coroutines (yet to use them but guessing there may be some…

I just wish they hadn't repurposed the old "auto" keyword from C and had used a new keyword like "var" or "let". #define var auto #define let auto

Given how important backwards compatibility is for C++, it's either take over a basically unused keyword or come up with something so weird that would never appear in existing code.

Java solved this by making var a reserved type, not a keyword, but I don't know if that's feasible for C++.

Re: 21st Century C++

#143

Previous from 3 days ago: https://news.ycombinator.com/item?id=42952720 (103 points, 85 comments)

Thanks! I've merged that thread hither since this one is currently on the front page.

(How is that possible, someone may ask? It's the SCP! - see https://news.ycombinator.com/item?id=26998308)

Re: 21st Century C++

#144
post #129

Earlier quoted context omitted.

Professionals know what tool to use for a job. Does it take time to become good? Of course, like anything.

Not a question of difficulty or skill. I am saying professionals can't agree what subset to use!

They don't have to. The subset depends on the job! That's the beauty and power of C++. That's why we have projects written in it in all domains. From websites to spaceships and Mars rovers.

Re: 21st Century C++

#145
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. Luckily my team switched to Rust almost 100%. So I don't need to learn about the godforsaken coroutine syntax and what pitfalls they laid when you use char wrong with it or in which subset of calls std::range does something stupid and causes a horrible performance regression.

Bjarne has been criticized for accepting too many (questionable) things into the language even at the dawn of C++ and committee kept that behavior. Moreover they have this pattern that given the options they always choose the easiest to misuse and most unsafe implementation of anything that goes into standard. std::optional is a mess, so is curly bracket initialization, auto is like choosing between stepping on Legos or putting your arm into a spider-full bag.

The committee is the worst combination of "move fast and break things" and "not in my watch". C++98 was an okay language, C++11 was alright. Anything after C++14 is a minesweeper game with increasing difficulty.

Re: 21st Century C++

#146
I dislike the style of Code used to write this. I understand that, given who wrote the article, this is blasphemy.

Opening braces should be inline with the expression or definition.

Comments can be above what they're referred to.

Combined, this makes any code snippet look like crap on mobile and almost impossible to follow as a result.

Re: 21st Century C++

#147
Seeing badly formatted code snippets without color highlighting in article called "21st Century C++" somehow resonates with my opinion on how hard to write and to ready C++ still is after working with other laguages.

Re: 21st Century C++

#149
post #145
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. Luckily my team switched to Rust almost 100%. So I don't need to learn about the godforsaken coroutine syntax and what pitfalls they laid when you use char wrong with it or in which subset of calls std::range does something stupid and causes a horrible performance regression. Bjarne has been criticized for accepting too many (questionable) things into the language even at the dawn of C++ and committee kept that…

> Bjarne has been criticized for accepting too many (questionable) things

He even writes that way in his own article... The quote from the last section of the introduction was hilarious, and actually made me laugh a little bit for almost those exact reasons.

BS, Comm ACM > "I would have preferred to use the logically minimal vector{m} but the standards committee decided that requiring from_range would be a help to many."

Re: 21st Century C++

#150
post #84

Earlier quoted context omitted.

I hoped Sean would open source Circle. It seemed promising, but it's been years and don't see any tangible progress. Maybe I am not looking hard enough?

He's looking to sell Circle. That must be the reason he's not open sourcing it.

Huh, I guess if that was the motivation all along.
Post reply on HN