6 ms·
> It seems that many of the seasoned developers have forgotten why we stopped using C++ and moved on to Java, C# and other modern languages. Did they? Somehow
by shmerl 14y ago
> It seems that many of the seasoned developers have forgotten why we stopped using C++ and moved on to Java, C# and other modern languages.
Did they? Somehow I didn't notice everyone moving to other languages :) C++ has its obvious strengths and is a widely used language. So it doesn't need to come back - it's already here.
> C++ is the wrong direction for the future
I could accept this argument only if author would focus on fundamental features that C++ doesn't readily provide - inherent concurrency safety for example and so on. So languages like Rust can be considered a better direction for the future which lies in massively multicore architectures. But C#? No, it's not a direction for the future in comparison to C++.
- rizzom5000 14y agoI stopped reading about the time the author implicitly compared C++ to Java and C#. Sure, these things all share a similar syntax, but one of these things is not like the others.
- shmerl 14y agoYes, if something can be considered a competing successor of C++ it has to be from the same compiled family of languages at least.
- rgbrgb 14y agoJava was intended as a successor to C++ for the web [1] and I'd say it was quite successful in that regard. [1]: http://www.oracle.com/technetwork/java/intro-141325.html#334 http://www.oracle.com/technetwork/java/intro-141325.html#334
- shmerl 14y agoThat's very questionable. "For the Web" argument falls apart if you consider that Java applets are complete failure. The Web is ruled by JavaScript without any doubt (and if something, ActionScript/Flash programs on the Web are much more common than Java ones). And while as general purpose language Java is used quite a lot, it can't replace C++ for applications which require best performance. So Java really fills its own niche, and I wouldn't consider it as a full blown successor of C++, even if it was intended to be such.
- seanmcdirmid 14y agoThere was a time when C++ was it, it was the present and the future. Then Java came out and C++ was increasingly relegated to niche use cases (device drivers, games, HPC). No one would ever dream today of writing a web service in C++, but back in 1995, that definitely wasn't the case. As a related aside, Microsoft recently enabled us to use C++ for WinRT UI apps; keep in mind that WPF (WinRT's predecessor) only supported C# and VB (well, their was the CLR version of C++, but who used that?). So now you can write your Win8 metro app in C++ if you want, but why go through the pain and misery of doing that? Why choose C++ if C# is good enough for what you are doing?
- beatgammit 14y agoI completely agree. I wish the author had mentioned one of the other replacements for C++, like D, Go or, as you mentioned, Rust. C++ can't be fixed by adding to it. That's how it got so unmanageable in the first place. Personally, I just write in C when I need performance, but then again, I don't work on large projects that need raw speed. For me, D and Go are good enough. They beat the pants of any interpreted language, and they offer compelling features not found in C++ (like simplicity, have you seen D's templates? Work of art...).
- tikhonj 14y agoI don't think Go is any more appropriate as a comparison to C++ than Java or C# are. After all, Go essentially competes in the same space as Java and C#--it's a managed imperative language designed for use on a server. Now, D and Rust are another story. After doing a bit of reading, I'm actually very excited about Rust. For me, Go is essentially completely useless: it fills the same niche as Java, C# or--far more importantly--Haskell or OCaml. If I need code that's relatively fast but don't want to sacrifice memory safety or the convenience of a high-level language, I can do much better than Go. On the other hand, if I want really low-level access to the system, for whatever reason, I don't have many good choices. I could do C, but that's rather unsafe and unpleasant; I could do C++, but it's a gigantic, overly complex language and also rather unsafe and unpleasant and I could do D. (I've actually heard good things about D but have never tried it.) Rust gives me the perfect alternative--a simpler, higher-level language that's more pleasant to use but still lets me operate at a relatively low level. So next time I need to do something like that (which, honestly, probably won't be soon), I'm almost definitely going to use Rust, even if it's in active development and changing all the time. EDIT: In re-reading this comment, I have realized that "high-level" and "low-level" really aren't great terms (at least the way I'm using them). Particularly, they're not mutually exclusive: a language can both support a high level of abstraction and provide low-level systems access where needed. Of course, I can't think of any language that actually does this, but Rust seems very promising.
- acqq 14y agoIf you're doing anything serious, you need something that is going to compile even when compiler changes from version to version, unless you plan to write only a few lines, when it doesn't matter which language is used anyway. That's why I don't understand your argument for Rust. I'd vote for D.
- alephnil 14y ago> Did they? Somehow I didn't notice everyone moving to other languages Neither did the FORTRAN and COBOL programmers back in the days. The reason is that there were plenty to do (and still is) for those already involved. That is also the case to a less degree with C++. It is just that most of the growth has been elsewhere. You won't find much web programming in C++, which is the area where the largest growth has been. There sure is some, I even have encountered web application in FORTRAN, but most web applications are written in PHP, Java, Ruby, Python and others, not C++.
- shmerl 14y agoComparison is not valid, since I'm considering many new projects. For example parallel computing (massive data processing) is mostly done in C++. Intensive 3D games are written in C++ as well. Just about anything that needs critical performance is written in C++. So we aren't talking just about legacy code, we are talking about new development.
- alephnil 14y ago> Comparison is not valid, since I'm considering many new projects. If C++ had never been considered for new projects, it would have been in sharp decline, which it is not. What I said was that most of the growth has been elsewhere, like in web where there is hardly any C++, and mobile apps, where there is relatively little C++ (some on iOS, but Objective C dominates there). My main point was that as long as the whole industry is in growth, you may not notice that the world has moved on, at least not if you measure the health of X by the "still new projects in X".