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

But at the same time, there is no alternative that ticks all the boxes C++ does (performance, portability, maturity and stability).

As you identified yourself, that's not entirely true, because C offers all of those things. But the really tragic thing about the status quo is that because there is so much sunk effort behind the C and C++ ecosystem, the resulting momentum makes it difficult for new languages that are simply better to gain traction.

In a way, C++ is the ultimate demonstration of how important the surrounding tool, library and developer ecosystem is to the success (== usefulness in practice) of a programming language. If the language itself were the dominant factor, the writing would have been on the wall when almost every language at a higher level than C was adding features like first class functions and C++ was trying to do something vaguely similar with overcomplicated binder templates.

A language with nicer syntax for working with higher-order functions, Haskell say, might have used

    xs = [1, 2, 3, 4, 5]
    n = count_if (<3) xs
But for many years in C++, the closest theoretical equivalent would have been to write something like

    xs = // some standard container type, tediously constructed
    n = count_if(xs.begin(), xs.end(), bind2nd(less<int>(), 3))
instead. Obviously hardly any real programmers ever did that, and it's true that modern C++ is better in several relevant ways, but it's been literally decades and it still hasn't entirely caught up.

Meanwhile, several much more promising languages are struggling to break into the kinds of markets they deserve to because they haven't achieved a critical mass of support. And the world continues to suffer the loss of productivity and problems with security and reliability that come from using a language like C++ for things that do actually matter. It's an understandable situation, but still a regrettable one.



> As you identified yourself, that's not entirely true, because C offers all of those things.

You're right, I contradicted myself there a bit. Fixed. But C is almost a subset of C++, except for some technicalities. So it's a bit hard to call it an actual alternative. Switching from C++ to C is more or less a matter of restricting oneself to less functionality (which in some cases is a good thing, but I digress).

Other than C it's hard to point at a solid alternative for many C++ use cases.

> In a way, C++ is the ultimate demonstration of how important the surrounding tool, library and developer ecosystem is to the success

Indeed! This is something that any language wanting to compete with C++ must get right. It's a hard thing to do.


This is something that any language wanting to compete with C++ must get right. It's a hard thing to do.

I suspect it's actually an impossible thing for a new language to do on its own, because it's not really a technical problem in the first place. It needs a new language with a "killer feature" and serious resources backing it to break through. Several of the relatively success new(ish) languages have combined those two attributes, with the language being in some sense the favoured one for writing software that runs on a certain platform.




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

Search: