Live data from Hacker News

C++ Should Be C++

open-std.org

41–50 of 191 posts

Re: C++ Should Be C++

#41
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…

Yeah, probably should have left the religion analogy out. It wasn't essential to the point you were making and was based on a false model of religion.

There's actually a pretty complex matrix in religious disagreement with or without exclusivity. And not all religions are exclusive at all. Islam's views of other Abrahamic religions is complicated, but it is exclusive about non-Abrahamic religions. Christianity sees Judaism as having been correct, but incomplete. Hinduism isn't essentially exclusionary (particularly to other religions which evolved from old Vedic practices), but is often confused with modern Hindu nationalism, which is. And even within single "religions" there are complicated lines where e.g. some Christians consider themselves to be in "communion" with some Christians, but not others.

So, yeah, bad example. It's a terrible thing to have pulled out to try to show clear mutually exclusive groups.

Re: C++ Should Be C++

#42

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

It was my understanding that one can easily add their own allocator to any STL container, though as you point out you have to write that allocator yourself

> one can easily add their own allocator to any STL container,

You and I must have a different definition of "easily "

Re: C++ Should Be C++

#43
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…

I mean the statement you quote is undeniable. If something is used by millions as a general-purpose programming language it is fit to the task, regardless of the alternatives or how ideal it is.

That depends on your criteria for fitness. There are millions of people using homeopathic remedies. That doesn't mean that homeopathy is actually fit for any of the tasks that people employ it for.

Re: C++ Should Be C++

#44
post #41
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…

Yeah, probably should have left the religion analogy out. It wasn't essential to the point you were making and was based on a false model of religion. There's actually a pretty complex matrix in religious disagreement with or without exclusivity. And not all religions are exclusive at all. Islam's views of other Abrahamic religions is complicated, but it is exclusive about non-Abrahamic religions. Christianity sees J…

What would have been a better example?

The problem with trying to come up with examples of large numbers of people holding objectively false beliefs is that you have to look outside the realm of science. The whole point of science is that it provides a mechanism for resolving disagreements about objective truth objectively (i.e. experiment) and so you just don't get a lot of people holding objectively false beliefs, at least not for any length of time. Religion is all that's left.

Re: C++ Should Be C++

#45

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

It was my understanding that one can easily add their own allocator to any STL container, though as you point out you have to write that allocator yourself

You can but it's definitely not easy to do correctly.

There's also a lack of traits that can describe what's required of a specialized allocator. For example, std::map only needs to allocate 1 object at a time in practice while std::vector needs to allocate a contiguous count of objects.

Re: C++ Should Be C++

#47

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

Yes

It is not about what we want. It is what we need

Not real.y "we". I have lost any interest in C++ now. I loved it, in the day. Time has moved on

Re: C++ Should Be C++

#48
post #38
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…

IMO the reason C++ isn't a general purpose programming language is due to memory management. Many many many applications can be built without having to worry about the garbage collector and the productivity gains of using a GC language is so so worth it. And I know you can force C++ into acting like a GC language, but why go through the effort? C++ is a precision tool for building complex and performant systems and t…

GC is not required for memory safety. The proper use of GC nowadays is for dealing with problems that inherently involve spaghetti-like reference graphs for which no other memory management strategy is suitable. Using it as mere convenience might be okay for quick prototyping, but it ultimately leads to half-baked, hard-to-refactor code requiring a lot of CPU and memory overhead at runtime.

Re: C++ Should Be C++

#49

> 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?

It depends on the contributors, but boost also almost always fails to consider performance implications.

For me it mostly looks like a reject pile for a stdlib that I must also reject most of the time.

The alignment of incentives between these library authors and people that use C++ for high performance applications is just off.

Re: C++ Should Be C++

#50
post #22

Earlier quoted context omitted.

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.

No, your analogy falls over.

The equivalent assertion is "Christianity is a good/useful belief system" (and "Islam is a good/useful belief system")

Now, you could endeavor to disprove that equivalent assertion, but your earlier argument doesn't.

Post reply on HN