Live data from Hacker News

C++ Should Be C++

open-std.org

21–30 of 191 posts

Re: C++ Should Be C++

#21
post #12

> It is easy to see that C++ is fit as a general-purpose programming language–adoption by millions is a testament to that. No, that is false. It is akin to arguing that Christianity must be true because 2.4 billion Christians can't be wrong. The fallacy is easy to see because the argument can be applied equally to the world's 1.9 billion Muslims and 1.2 billion Hindus and 500 million Buddhists, etc. And yet these gro…

"Christianity is true" and "Islam is true" are mutually-contradictory positions. "C++ is fit as a general-purpose programming language" does not contradict "X other language is fit as a general-purpose programming language". So your logic in your first non-quote paragraph doesn't work.

[Edit: To respond to the actual point: For every claim that X is fit as a tool to do Y, the evidence that millions of people use X to do Y is in fact proof of the claim. If the claim had been "C++ is the best language for general purpose programming", then your argument would have merit. But that wasn't the claim.]

Re: C++ Should Be C++

#22
post #12

> It is easy to see that C++ is fit as a general-purpose programming language–adoption by millions is a testament to that. No, that is false. It is akin to arguing that Christianity must be true because 2.4 billion Christians can't be wrong. The fallacy is easy to see because the argument can be applied equally to the world's 1.9 billion Muslims and 1.2 billion Hindus and 500 million Buddhists, etc. And yet these gro…

Awful analogy. C++'s fitness as a general-purpose programming language is not an exclusive assertion.

I'm not saying it is. I'm using the exclusivity of religious belief just as a short-cut to show that it is possible for large groups of people to hold false beliefs without getting into the weeds of which of those beliefs are actually false. The point is not that C++ is analogous to a religion, just that "adoption by millions" is not a valid argument for its merits.

Re: C++ Should Be C++

#24
> 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 atomics whenever possible; std::string allocating; the lack of built-in faster std::allocator replacements like bump allocators, memory pools, etc; no lockless and wait free concurrency primitives; no architecture-aware thread pools or even architecture descriptions; no IPC primitives; etc.

Considering how many C++ developers are working on things like games, high performance server applications, databases, and operating systems, it's just bizarre how inappropriate the standard headers are for these tasks.

Even something trivial like casting bytes off the wire to a packed struct is an exercise in frustration due to aliasing rules that should have been encoded in the type system and invisible to the user.

Re: C++ Should Be C++

#25

> What is much less prevalent is a demand from average C++ users for memory safety features; they’re much more concerned about compilation speed. When most C++ developers haven’t adopted tools like Coverity and C++ core guidelines checkers, it is hard to claim that memory safety features substantially improve their lives at least from their point of view. I don’t really agree with this. There’s also a group of develo…

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.

Re: C++ Should Be C++

#26
post #12

> It is easy to see that C++ is fit as a general-purpose programming language–adoption by millions is a testament to that. No, that is false. It is akin to arguing that Christianity must be true because 2.4 billion Christians can't be wrong. The fallacy is easy to see because the argument can be applied equally to the world's 1.9 billion Muslims and 1.2 billion Hindus and 500 million Buddhists, etc. And yet these gro…

A religion does not have to be true to serve a positive social function. Arguably, the persistence of the most ancient and widespread faiths suggests that they do serve such a function.

Re: C++ Should Be C++

#28
"Consider the hoops one needs to jump through to make std::print work with a custom type when compared to the old stream operators."

As an old timer, this kind of made me laugh. I remember when people found the old stream operators burdensome.

Re: C++ Should Be C++

#29
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.

Post reply on HN