Skip to main content
GameDev.net gamedev.net
🔒 Locked

Future of C++

Started by Jarwulf Oct 1, 2009 at 6:34 PM 28 replies 5.1k views
Original Post
Jarwulf
Jarwulf
I've run into a large number of discussions from a few years back proclaiming the 'death' of C++ due to the fact that newer languages are 'easier and more productive' and I want to get some of your thoughts about this. Java seems to be on top of the heap in terms of popularity and jobs by most measures. And C still outstrips C++ in demand in some ways while other new languages like C# are becoming very popular. But I also know that C++ is the dominant language in games programming. I always thought that Java was mainly confined to web and small programs, C is mostly for systems programming, while C++ is still the most popular choice for large and/or offline applications. Is this right or do you see Java or something similar displacing C++ from all its niches? Is C++ headed the way of COBOL?
jackolantern1
jackolantern1
During the life of a programming language, the more popular ones get many different tools made to work with them, and lots of code gets written in them. C/C++ (the differences are mainly in paradigm, not application) is exactly that language, as it has been on the top of the heap for a long time. Tons of code has been written with it and thousands of tools have been made for it. A language with that many resources doesn't just die out. The main difference between C/C++ when you compare it to COBOL is that COBOL was popular and on the top of the heap when individuals really had no outlet for programming. It was reserved for a few people in universities and in large engineering companies. Lots of code was written, and many tools were made, but that was before the democratization of programming and computers so the amounts of these resources made were trivial compared to today.

C/C++ are not going nowhere. There is no death match going on between Java and C++ on top of the mountain that everyone in the valley claims that there is. With the advent of smart IDEs and better teaching methods, many developers easily learn and use both depending on the situation and what they are comfortable with.

[Edited by - jackolantern1 on October 2, 2009 12:52:21 AM]
s_p_oneil
s_p_oneil
I disagree with jack, or at least with the way he answered. The honest truth is that if you're writing a Windows GUI application, it makes no sense to use C++. If you're writing back-end server components, it makes no sense to use C++. If you're writing a database application, it makes no sense to use C++. In fact, there are very few types of applications where using C++ still makes sense. All the other times, you're just wasting time and money. The last time I looked, 48% of the job offers were for Java, 48% were for C#, about 2% were for C++, and 2% for miscellaneous (I'm not counting web programming jobs), so apparently I'm not the only one who has realized this.

The only time C++ makes sense anymore is when you have no better choice (i.e. writing a wrapper to interface between C/C++ and a higher-level language) or when you need to be able to squeeze the last drop of performance out of the platform (i.e. games). Obviously C++ won't die completely. Even Fortran still has a strong following. C++ will have a niche in games and a few other areas of programming. And of course, there's an awful lot of existing C++ code out there to maintain.
wicked357
wicked357
Quote:
Original post by s_p_oneil
I disagree with jack, or at least with the way he answered. The honest truth is that if you're writing a Windows GUI application, it makes no sense to use C++. If you're writing back-end server components, it makes no sense to use C++. If you're writing a database application, it makes no sense to use C++. In fact, there are very few types of applications where using C++ still makes sense. All the other times, you're just wasting time and money. The last time I looked, 48% of the job offers were for Java, 48% were for C#, about 2% were for C++, and 2% for miscellaneous (I'm not counting web programming jobs), so apparently I'm not the only one who has realized this.

The only time C++ makes sense anymore is when you have no better choice (i.e. writing a wrapper to interface between C/C++ and a higher-level language) or when you need to be able to squeeze the last drop of performance out of the platform (i.e. games). Obviously C++ won't die completely. Even Fortran still has a strong following. C++ will have a niche in games and a few other areas of programming. And of course, there's an awful lot of existing C++ code out there to maintain.


I am not sure where your facts are coming from, but I have seen the desire for C++ more then C#, in fact I haven't seen many jobs that are looking for 3+ years of C# experience, and I live in a very rich software environment area. I would say Java is being desired quite heavily though. Here is a little article I found based on a research done by a person trying to figure out the desired languages for job postings.

Job Statistics
peasoup
peasoup
Quote:
Original post by wicked357I found based on a research done by a person trying to figure out the desired languages for job postings.

Job Statistics


Interesting post on the statistics, although I noticed it's more than 3 years old. I wonder how it would compare today?

One place that C++ is still very prevalent besides games is Wall Street, specifically applications that are related to trading systems. Those apps are very Unix/C++ heavy.

Also a ton of the COM stuff that is in Windows is basically all C++, so you can probably expect it to be an integral part of Windows and Microsoft's plans for a while longer.
stupid_programmer
stupid_programmer
Quote:
Original post by s_p_oneil
The only time C++ makes sense anymore is when you have no better choice (i.e. writing a wrapper to interface between C/C++ and a higher-level language) or when you need to be able to squeeze the last drop of performance out of the platform (i.e. games). Obviously C++ won't die completely. Even Fortran still has a strong following. C++ will have a niche in games and a few other areas of programming. And of course, there's an awful lot of existing C++ code out there to maintain.


It also makes sense when you have years of C++ tools already made. If you got a proven toolchain that has put out apps making you money why should you take two years to rewrite it all in C# and have all that time you aren't making money? For startups without years of C++ inertia there is certainly a strong arguement for using something like C# or Java. But it will be a long, long time before C++ becomes a niche language.

neptunusmaris
neptunusmaris
Well first of all we all know that Java and C# dumb down Computer Science and schools are catering to Microsoft crap (I'm just saying).

But C/C++ will go no where and won't really budge to go anywhere. Because for instance if you want speed in your application performance use C/C++ ...

Just me jabbering on more...

Operating Systems: Most [good] operating systems are built based off of C programming, and some C++ ...I guess

High Level Scripting/Programming Languages: If you are a smart developer and want to make your own [high level] programming language (i.e. Perl/PHP/Python/Ruby/etc) use C.

Games: For performance ...use C/C++ because of C/C++'s low level computer controls work wonders.

All of the above: PERFORMANCE and PORTABILITY C/C++ can go anywhere without having to have emulators or virtual machines!

Yes I know C/C++ can be harder to learn and tedious ...its a science! Java and C# are just made for business and are not teaching the true science behind programming. You should meet the die hard programmers of C# and really don't know shit about Computer Science as they claim because Visual Studio does everything for them, yes it is convenient but, come on ...


So in conclusion ... C/C++ will never DIE!

Jarwulf
Jarwulf


I look at all the programs I use coded with C/C++ and I just have a hard time understanding what all the Java demand is going for. I know that applications with long histories are obviously going to be in C/C++ and obviously the web is huge but are Java and C# really dominating brand new nonweb applications?
Antheus
Antheus
There is no C/C++, except in job adds that do not know what they want. C and C++ have increasingly less in common.

System programming, embedded and highly portable code remains in C. And don't even think of mentioning C++ on linux kernel boards.

Quote:
PERFORMANCE and PORTABILITY C/C++ can go anywhere without having to have emulators or virtual machines!


Which is why servers are all virtualized, why Win 7 will ship with virtualized XP, why DosBox and other emulators are used, why COBOL is being transcoded to Java, .....

Performance doesn't matter anymore, and portability is a non-issue, at least outside of niches.

The long-term direction for the future is scalability, and curly-brace languages are not well suited for it.

C and C++ are here to stay. But their market share is essentially flat and has been for a while now.

Second factor is dynamics and cost of development. As teams globalize, monolithic, tightly coupled environments are simply unsuitable. And while C is still very useful for low level binding, it has next to no place anywhere else.

One thing is very important here. Just because C++ is still around, doesn't mean jobs will be. Core routines are being increasingly provided by companies like Intel, straight from their research labs, and packaged with whatever commodity development market requires. And due to this, only thing that still matters are libraries, not the language they are called from. And about the only criteria that still matters for languages is rapid development.

Also, these days, people are asking whether Java is dead as COBOL, C++ is dead an burried.

Quote:
but are Java and C# really dominating brand new nonweb applications?

For many reasons, nonweb applications are going the way of COBOL. Majority of development will (or already has) migrate to "the cloud". At least the relevant development.

Reasons here have to do with non-technical issues, such as support, portability, administration, deployment, as well as vendor lock-in, protection of proprietary software, and so on...

As said, C++ is flat, but rest of the development is exploding. And yes, just like there are still COBOL jobs today, so will be C++ jobs in 20-30, perhaps even more years.
agm_ultimatex
agm_ultimatex
A lot of job postings I see are either java or C# for the web. They are such big popular languages for business web applications and web services. For now, and for a while C++ will dominate in games. When it comes to web, I personally have become extremely interested in the Ruby On Rails framework.
BeanDog
BeanDog
Quote:
Original post by neptunusmaris
Well first of all we all know that Java and C# dumb down Computer Science and schools are catering to Microsoft crap (I'm just saying).

What school do you go to? My university and every other one people I know attend or have ever attended have a strong culture of Unix worship and Microsoft hatred in the CS department. Java has become very popular as a teaching language, and C# is even starting to make inroads, but "schools are catering to Microsoft crap"? Really?

Also, computer science is not the study of C/C++ pointers. Using other language paradigms is not a dumbing down of computer science, it is another way of implementing the ideas generated by computer science.



Now, as to the death of C++? As mentioned before, it's not going anywhere for a long time for non-web applications. But I personally am pretty unlikely to write anything but a game in C++ ever again, as the performance gains over something much more productive (like C#) have become irrelevant. I may not be the whole programming society, but I don't think I'm that far of an outlier.
jackolantern1
jackolantern1
-facepalm-

I specifically stayed away from any language vs. language discussion because this is what happens. A whole bunch of:

A. "The sky is falling and someone said the language I invested tons of time in is going to die!"

B. "My language is better than your language because of A B and C, so he language I invested tons of time in isn't going to die!"

I never compared C++ to anything else. I only stated that it is firmly rooted into several different industries.

Seriously. All of the major languages have their purposes, strengths, weaknesses, tools made with them, good courses at universities, industries that they are rooted in, job opportunities, etc. I don't see any of them going anywhere anytime soon. Plus, the days of a programmer choosing one language to use through their entire career are basically over. Each CS major coming out of college today has had extensive coursework in at least 2 languages, if not 3 or more.

EDIT:

Quote:
Original post by jackolantern1
C/C++ are *not* going nowhere.


Doh! One missed word could have potentially changed the entire meaning on my first post. Fixed it.

kunos
kunos
Quote:
Original post by neptunusmaris
Well first of all we all know that Java and C# dumb down Computer Science and schools are catering to Microsoft crap (I'm just saying).

But C/C++ will go no where and won't really budge to go anywhere. Because for instance if you want speed in your application performance use C/C++ ...

Just me jabbering on more...

Operating Systems: Most [good] operating systems are built based off of C programming, and some C++ ...I guess

High Level Scripting/Programming Languages: If you are a smart developer and want to make your own [high level] programming language (i.e. Perl/PHP/Python/Ruby/etc) use C.

Games: For performance ...use C/C++ because of C/C++'s low level computer controls work wonders.

All of the above: PERFORMANCE and PORTABILITY C/C++ can go anywhere without having to have emulators or virtual machines!

Yes I know C/C++ can be harder to learn and tedious ...its a science! Java and C# are just made for business and are not teaching the true science behind programming. You should meet the die hard programmers of C# and really don't know shit about Computer Science as they claim because Visual Studio does everything for them, yes it is convenient but, come on ...


So in conclusion ... C/C++ will never DIE!


honestly, I don't know where to start. This has to be one of the most uninformative post I have ever read on gamedev.net.

I can only hope that humanity knows better.
Atrix256
Atrix256
Here's one thing to consider if you think C++ is dying...

What language are Java and C# themselves programmed in? (:
DevFred
DevFred
The future of C++ is C++0x. Everything else is uncertain.
Daerax
Daerax
Quote:
Original post by neptunusmaris
Microsoft crap (I'm just saying).


I must disagree with this phrase. I am no fanboy and only program as a side-effect of my job so I care more about results than religion and fads. I use scala (jvm), f#, c# mainly. I like javafx. Im not a fan of dynamic languages but my fav dynamic language is ruby.

Now, regardless of the incompetence of marketing and branding, in terms of developer tools, there is no company that rivals microsoft in terms of what they have coming out for production out of research. Here are a few:

Visual Studio - one of the top if not so IDEs out there.

CLR - not perfect but can't think of a better designed JITted common language runtime.

C# - Not my favourite but my most prefered curly brace popular language.started as a java clone but now a language worth using due to parametric polymorphism (F bounded essentially) support of monadic, functional and if necessary dynamic styles.

F# - a fully functional (one of the fastest), type inferred, full monadic support, first class events + agents, asynchronous programming workflows, and more...

Microsoft Solver Foundation - express edition/free of this linear and constraint programming library is awesome. most of the fools in this industry charge 3 legs and an arm for crap.

Concurrent Parrallel/ ayschronous frameworks etc

Concurrent runtime
Parallel Framework
Reactive Framework <- This is some awesome stuff basically the Categorical Dual of IEnumerable. The implications are just damn!

Dryad + Dryad LINQ <- kinda sad cause is limited to HPC Server
Software Transactional Memory
BeanDog
BeanDog
Quote:
Original post by Atrix256
Here's one thing to consider if you think C++ is dying...

What language are Java and C# themselves programmed in? (:

I don't think C++ is dying, but this is not a great argument.

All languages start as implementations using other languages. The first C compilers were written in assembler. Do you think that's still the case for modern C compilers? The first C++ compilers actually just did a source-to-source translation from C++ to C, then used a C compiler to get to assembler, then the assembler to get into machine code.

You could definitely write a fantastic C# compiler using C#, and if they haven't already, they may do so soon.
Antheus
Antheus
Quote:
Original post by Telastyn
Job trends in the 3 languages over the past 4 years


Make sure to click absolute scale as well. C# is newest of the bunch and is still in adoption phase.

Also, Java has stalled in favor of other languages running on JVM. So while JVM and its standard library are here to stay, there will be quite some growth not labeled as Java. Similar to .Net.

But as already said, C++ is flat and has been for a long time now, and this isn't changing.

Telastyn
Telastyn
Quote:


Make sure to click absolute scale as well. C# is newest of the bunch and is still in adoption phase.

Also, Java has stalled in favor of other languages running on JVM. So while JVM and its standard library are here to stay, there will be quite some growth not labeled as Java. Similar to .Net.


Quite true, and of course the semi-obvious "this only hits job postings, written by HR drones and might not be representative of what work you'll actually be doing" inaccuracies apply.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.