Live data from Hacker News

C++ Should Be C++

open-std.org

61–70 of 191 posts

Re: C++ Should Be C++

#61

"upcoming anti-C++ safety regulations" Is this a thing really or just FUD?

It's both and neither. Some countries are considering legislation to require "memory-safe" tooling for "critical" workloads, and C++ has never been placed on the "memory-safe tooling" list.

Re: C++ Should Be C++

#62
post #13
post #4

Earlier quoted context omitted.

I don't know if you're in the minority or I am, but I find modern C++ to be borderline intolerable (and I've been programming mostly in C++ from before there were C++ compilers). I used to love C++ (and still do if we're talking about older standards), but the new stuff is just a baroque torture.

Aye, same here. I don't mond C++ evolving into some thing of its own beyond all recognition, but there is a distinct lack of modern "C with Classes" language. Basically, C on steroids. There are attempts at that, but none is perfect and/or has enough traction to be viable.

You can still have "C with Classes" in modern C++ if you really want that. Just set a style guide that limits your code to that.

There's more viable coding styles in C++ than I can honestly even bother to count. There's absolutely no reason to limit the language to one specific coding style when doing so would alienate large groups of users and you can set those limits yourself on your project.

Re: C++ Should Be C++

#63
post #51

Earlier quoted context omitted.

I think it's less about not wanting memory safety and more that compilation speeds are so time-wastingly abysmal that it's a few orders of magnitude more important to address. The whole deal with interpreted languages was to avoid sitting there for a few minutes every time you make a god damn one letter change, with the unfortunate but usually acceptable trade-off of some execution speed.

And the additional trade-off that some bugs are only noticed at runtime when that particular line is executed while it could have been noticed by the compiler of a strongly typed language. Pytype helps but at this point you have a static analyzer that potentially runs as slow as a compiler without the additional performance benefit.

Idk as long as you can develop at speed I don't see why a static analyser that's a few times slower than compiling couldn't run on the latest commit overnight? More as a sonarqube type thing I suppose.

Re: C++ Should Be C++

#64
post #57
post #55

Earlier quoted context omitted.

It's easy to see that driving on the RIGHT side of the road is a fit as a general mode of transportation. Adoption by millions is a testament to that. It's easy to see that driving on the LEFT side of the road is a fit as a general mode of transportation. Adoption by millions is a testament to that. Both statements are true. The author didn't say only C++ is fit. Nor did he say a program written in BOTH C++ AND pytho…

No. I'm not saying that C++ is not fit as a general purpose programming language. It very well may be. All I'm saying is that "adoption by millions is a testament to [the fitness of C++]" is not a valid argument. If it were, "adoption by millions is a testament to truth of [objective religious claim X]" would be a valid argument, and it manifestly isn't because different religions make mutually exclusive objective cl…

"adoption of X is a testament that it is fit for purpose" and "adoption of X is a testament of truth" are two incredibly different things.

The equivalent statement would be that "adoption by millions is a testament to the viability of X as a cohesive religion".

Re: C++ Should Be C++

#65
post #57

Earlier quoted context omitted.

No. I'm not saying that C++ is not fit as a general purpose programming language. It very well may be. All I'm saying is that "adoption by millions is a testament to [the fitness of C++]" is not a valid argument. If it were, "adoption by millions is a testament to truth of [objective religious claim X]" would be a valid argument, and it manifestly isn't because different religions make mutually exclusive objective cl…

"adoption of X is a testament that it is fit for purpose" and "adoption of X is a testament of truth" are two incredibly different things. The equivalent statement would be that "adoption by millions is a testament to the viability of X as a cohesive religion".

"Fitness as a general purpose programming language" is (at least in part) an objective claim. If a million people professed to believe that, say, brainfuck was fit as a general purpose programming language that in and of itself would not make it so. This is not the case for being a cohesive religion. If a million people profess to believe some religious belief, that in and of itself is sufficient for that belief to be a cohesive religion.

Re: C++ Should Be C++

#66

If C++ wants to continue evolving, it needs breaking changes. It needs to impose a migration duty to the user, but that is not going to happen. So it will die a death by entropy where noone can know the language.

> it needs breaking changes.

Then nobody will use the new compiler because nobody wants to rewrite millions of LOC and introduce new bugs.

Re: C++ Should Be C++

#67

> It is easy to see that C++ is fit as a general-purpose programming language–adoption by millions is a testament to that. I really wish the std would drop this pretense and focus on C++'s strong point: Continue being the fastest systems language possible. Everywhere in the std lib you can see compromises that require rewriting substantial portions for any real time application. Things like: shared_ptr eagerly using…

Why does this have to be part of the standard library? Isn't that the whole point of Boost, that one is not limited to what's in std?

I have never once seen Boost seriously considered in performance environments.

Re: C++ Should Be C++

#68
post #8

Nevermind the language itself, we need a way to pull compilers and project dependencies, pinned to their specific versions, with a single, ergonomic tool. vcpkg seemed really promising but the fact that they didn't start with library versioning from the get go was a very stupid decision, and nowadays versions are pinned to specific commit hashes rather than actual dependency versions, and libraries that weren't previ…

vcpkg was dead in the water because they altered source packages. Completely unacceptable in many situations.

Re: C++ Should Be C++

#69

"upcoming anti-C++ safety regulations" Is this a thing really or just FUD?

It's both and neither. Some countries are considering legislation to require "memory-safe" tooling for "critical" workloads, and C++ has never been placed on the "memory-safe tooling" list.

Which countries? Can you share the reporting on this legislation? I’d be very interested.
Post reply on HN