Live data from Hacker News

21st Century C++

cacm.acm.org

151–160 of 281 posts

Re: 21st Century C++

#151

The C++ Core Guidelines have existed for nearly 10 years now. Despite this, not a single implementation in any of the three major compilers exists that can enforce them. Profiles, which Bjarne et al have had years to work on, will not provide memory safety[0]. The C++ committee, including Bjarne Stroustrup, needs to accept that the language cannot be improved without breaking changes. However, it's already too late.…

>Despite this, not a single implementation in any of the three major compilers exists that can enforce them

Because no one wants it enough to implement it.

Re: 21st Century C++

#152

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 inves…

AIEXPERT here I come!

Awesome! My current tag is /DEV/AGI :-)

Re: 21st Century C++

#154
post #144

Earlier quoted context omitted.

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.

yes, and you will tell me exactly what subset and coding convention "makes sense" for this domain, and you will give your reasoning too. And I will give my arguments, and on and on it goes. teams have broken up over this.

A well-designed language is one in which there are very few different ways of doing the same thing. And C++ is definitely not that.

Re: 21st Century C++

#155
post #151

The C++ Core Guidelines have existed for nearly 10 years now. Despite this, not a single implementation in any of the three major compilers exists that can enforce them. Profiles, which Bjarne et al have had years to work on, will not provide memory safety[0]. The C++ committee, including Bjarne Stroustrup, needs to accept that the language cannot be improved without breaking changes. However, it's already too late.…

>Despite this, not a single implementation in any of the three major compilers exists that can enforce them Because no one wants it enough to implement it.

Or it's better to have other languages besides from C++ for that.

Re: 21st Century C++

#156

Earlier quoted context omitted.

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 w…

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…

[deleted]

Re: 21st Century C++

#158

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.

This honestly looks like C++ being feature-juryrigged to a degree that it doesn't even look like what C++ is: a c-derived low level language.

Everything is unobvious magic. Sure, you stick to a very restricted set of API usages and patterns, and all the magic allocation/deallocation happens out of sight.

But does that make it easier to debug? Better to code it?

This simply looks like C++ trying not to look like C++: like a completely different language, but one that was not built from the ground up to be that language, rather a bunch of shell games to make it look like another language as an illusion.

Re: 21st Century C++

#159

21st century C++? AKA Rust?

Unfortunately, Rust is significantly less expressive than C++ and therefore is unlikely to replace it for high-performance systems code. As much as I don’t like C++, it is very powerful as a tool. The ability to express difficult low-level systems constructs and optimizations concisely and safely in the language are its killer feature. Once you know how to use it, other languages feel hobbled.
Post reply on HN