Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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 groups hold mutually-exclusive positions and so at least N-1 of them must be wrong.

Humans are social animals. With only a few exceptions, we tend to conform to the group. That tends to make us get stuck in very deep ruts. "Everyone is doing it" is absolutely no indication that "it" is a good idea.

[UPDATE] A lot of people seem to be missing the point here, so I feel the need to clarify: I'm not saying C++ is analogous to a relgion. 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.

[UPDATE2] I am also not saying that religion has no value beyond the truth of its objective claims. I am only saying that (some of) the world's major religions do make objective claims, some of those claims are mutually exclusive, and so some of them must be objectively false, and therefore it is manifestly true that large groups of people can hold objectively false beliefs, and therefore the fact that large groups of people hold a position is not evidence that that position is objectively true. Being "fit as a general purpose programming language" is an objective claim.



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.


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.


Most of what humans talk about isn't science or religion, and to reduce the world to just that is pretty weird to say the least. Most things can't be resolved by appeals to objective truth. It sounds like you're working on a model where that's how one resolves conflicts, but literally most of the history of knowledge, humanity, whatever label you want to put on it -- isn't that. Even science isn't by any means that binary. Disagreements can last centuries. And we're even at a spot in science where a lot of the interesting stuff fumbles around for decades before we can even come up with experiments that could possibly test it; and some of it we won't ever be able to test. (A lot of cosmology isn't testable.)

But the point me and a few others were making is that you don't seem to know much about religion, so it's probably not a good thing to use in analogies. Religion is definitely not a set of neatly divided mutually exclusive beliefs. Almost all of the world's adherents come from two families of religions -- Abrahamic or Vedic -- and within those groups there's a whole lot of similarity and varying levels of theological exclusivity.

I feel like gambling or the stock market may be better examples. If one person takes a long position on a stock and another short, they have mutually exclusive beliefs about it, and one of them will be wrong.


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 python (i.e. a system of driving on both left and right sides of the road) is fit.

The counter-argument (C++ is NOT fit as a general purpose programming language) is invalidated by millions of programmers who use it as such in the same way that thumbs are not fit for grasping is invalidated by, well, grasping with your hands.

It doesn't mean pliers are not fit for grasping just because thumbs are fit for grasping.

You're conflating types of evidence and types of arguments.


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 claims.


"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.


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

No, but if millions of people actually did manage to use Brainfuck for general purpose programming, then that would be evidence that it really is fit as a general purpose programming language, even if it's not ideal.

Brainfuck isn't in that position, hence no one thinks it's fit, but C++ is. People do use it for general purpose programming, even if their program could be rewritten in a garbage-collected language.


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 that is nothing to be ashamed of, but it is not something you would use for web api's, or a quick script, or UI's or any quick and dirty project. I also feel like the rust community is forcing the language into places where it shouldn't really be. But yeah - people can argue about what general purpose means to them, just my 2c.


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.


> GC is not required for memory safety.

>memory overhead at runtime.

These statements are true. The rest is grandstanding.


> but it is not something you would use for web api's, or a quick script, or UI's or any quick and dirty project

Maybe not, but that's a function of available/standard/free libraries rather than the language itself.

Personally I do use C++ for quick and dirty projects, but OTOH I've spent the last 10 years building libraries that make that convenient.


"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.]


> "to show that it is possible for large groups of people to hold false beliefs"

The claim from the article is not about their beliefs, it is about their activity. If a million people say that one can live many different lifestyles from a tent but those people actually live in suburban houses, they can potentially all be wrong. If a million people actually do live in tents while living many different lifestyles, QED, it is demonstrated - they aren't holding false beliefs, full stop. It's not a belief anymore, it's a fact. The fact that they are doing it shows it can be done at all, and the large numbers show it's not an extreme claim that only one or two weirdo obsessives could contort themselves enough to use, it's general enough for millions to do over many lifestyles.

> "Everyone is doing it" is absolutely no indication that "it" is a good idea.

It is too; "When in Rome" is advice because whatever the Romans are doing, it isn't killing them or getting them into fights or mugged or annoying someone powerful. If you don't have any reason to do otherwise, eating what the Romans eat, drinking what they drink, behaving how they behave, is a far far better starting point than almost any other. As a guest in someone's house, trying behave how the homeowners behave is a good idea; 90+% of starting points will be worse, most things you could try to eat will make you ill or kill you, most of the world's thousands of programming languages are toys or niche domain systems or wildly outdated or proprietary and gone out of business. The ones millions of people use? Pretty good idea to use one of those, unless you have very good reasons for doing otherwise.


> The claim from the article is not about their beliefs, it is about their activity.

No, the claim is about a property of a programming language. The activity is cited as evidence in support of the claim of the fitness of C++ as a general-purpose programming language.

The problem with C++ is that it is a legacy language, and so the fact that a zillion people use it today might be because it's a good language, but it might also be because it has so much institutional inertia behind it that this is enough to override the fact that it's a totally shit language. The Catholic Church has been around for 2000 years, but that doesn't necessarily mean that its factual claims have any merit. The Church's success might be because it is in communion with the truth, or it might be because it has so much institutional and societal inertia that it keeps chugging right along despite having no actual merit. The success of the Church might also be due to people subscribing to the logical fallacy that because a lot of people subscribe to it that it must have some merit, which after a while becomes a self-sustaining cycle. (Note that a self-sustaining cycle is different from a self-fulfilling prophecy because the latter actually becomes true if enough people subscribe to it.)


Awful analogy.

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


That's not the point. The point is that "N people can't be wrong" is not a valid argument for any value of N.


It's a programming language that has been used by lots of people in a lot of different contexts. The author of the article think it's a good definition for "general purpose programming language". The original author has never said "N people can't be wrong", it's the reframing of top comment. You can disagree with the "general pupose"-ibility of C++ but I don't think it's an honest way to interpret the argumentation of the author of the article.


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.


My argument applies equally well to that: the mere fact that a religion has large numbers of adherents does not in and of itself show that it is either good or useful. But that's a harder case to make because it turns on what is meant by "good" and "useful", and those are things about which reasonable people can disagree.

To be clear, "fitness as a general purpose programming language" is also something about which reasonable people can (and manifestly do) disagree. All I'm saying is that having large numbers of adherents is not a valid argument in favor of fitness any more than it is an argument in favor of goodness or usefulness. It's possible that all it shows is that a lot of people drank the kool-aid.

[UPDATE] It's also possible that most of the people using C++ think that it sucks, and they are all just using it because everyone else is using it.


Your argument is "large numbers of people can be wrong, as shown by the fact that either Christians or Muslims are wrong."

But metaphysics/religion is different than programming language utility.

We can expect a higher degree of accurate judgment in the latter.


> metaphysics/religion is different than programming language utility.

Of course it is. But religions make mutually exclusive objective claims. Metaphysics has nothing to do with it.


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.


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.


You know that people actually write complex software in C++ right whereas homeopathy does not achieve anything.


I know that some people write complex software in C++. I suspect that number is actually very small.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: