Is C++ here to stay?

Pages: 12
Is C/C++ here to stay or is it going to be replaced in the near future?
C++ is here to stay. C however is gradually being phased out and replaced with C++... but this is taking a loooong time to occur. And don't let those C# and Java High Level morons tell you otherwise :).
Last edited on
I am so glad. I hate C#. And Java. Actually I can't decide which one I hate more. Probably java. It's slower.
closed account (z05DSL3A)
C however is gradually being phased out and replaced with C++
Is it?

Probably java. It's slower.
Argh! Here we go again....
Grey Wolf wrote:
C however is gradually being phased out and replaced with C++
Is it?


lol well... that's the goal isn't it? :)

nick85 wrote:
I am so glad. I hate C#. And Java. Actually I can't decide which one I hate more. Probably java. It's slower.


Don't think of it that way. Both are tools in your tool box. Pick and choose what's appropriate for the task at hand.
I can think of a few occasions in which C# and Java would come in handy.

C#. When developing for Windows in a C-like language. C# was developed by Microsoft itself and has a good integration with the Windows OS.

Java. When developing an application that needs the capability to run on a lot of systems without having to worry about little code changes depending on the system (or even the lack of the possibility of a port, for example because of a missing library).
Actually I see a trend where C++ is used less and less in application development and its place taken by Java or C# mainly (although Objective-C can be heard as well). I think the main problem arises from something that is in the first post, the "C/C++" thing, as they were the same language.

One side is that trying to make C++ compatible with C obfuscated its grammar quite a bit, and some C++ concepts are difficult to grasp just because its, lets say, awful syntax.

The other side is that many efficient C programmers present themselves as C/C++ programmers, just with very little C++ knowledge (that is, they are great writing C code but they suck writing in C++), as if both were the same language. Because of this, filtering C++ candidates out from "C/C++" candidates is very difficult without an extensive battery of tests, that you can only afford at the end of the selection process.

And you may discover that none of the candidates is what you are actually looking for, but as you need real help anyway, you end up hiring a half cooked developer that writes half cooked code. If you are not careful your app becomes a nightmare of allocation bugs, calls to the wrong method and so... some of them only appearing randomly in difficult to reproduce situations. And sometimes, due to fragmentation, you cannot find anyone with experience in a certain toolkit, that is more difficult to happen in Java or C# where there are extensive standard library classes.

As well, for whatever reason Java and C# are different enough so they are not considered a superset of C, so when you interview a C# programmer, you know perfectly what you've got in front of you. A good C++ programmer is difficult to find because that confusion with C.

I am currently evaluating the implementation of some embedded products in Java as it is easier to find good Java programmers (till now we have been using C++ and Qt, technically an excellent combination).

I think these are issues that have been suffered by the whole industry and now C++ is paying for that.

C is the other way around, it is a very small, relatively easy to use language, that has been extending more and more. In embedded hast taken almost any niche, do you know anyone programming in assembler?? (for sure not as many as 10 years ago). C looks quite robust with a more or less constant share.

Just because I like to support what I say with factual data, just a link:

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
(have a look at the long term trend)

Cheers
Last edited on
It will be replaced by D!

http://en.wikipedia.org/wiki/D_(programming_language)

Fortunately, that's only one letter away so the transition should be easy. ;-)

Bottom line: If anyone, anywhere is coding in C++ it's not phased out. It's not like there's some entity out there that can take it away from us.
The trend in Business Application development definitely has swung in favor of Java and C# although I'm starting to see Java being pulled from many of the consulting jobs I've completed... I'm consulting with a large client now that is undergoing a modernization effort and it includes replacing all Java apps with C#.net. I'm hearing a lot of companies state Java is no longer a modern option. I've heard several reasons for this, some about Oracle's new control over Java, the popularity of C# in the states, it may even be a biased view because the current architect only knows .net, etc... Business systems typically are not cross platform because companies have a designated platform. Public software on the other hand is concerned with cross platform so I think that is where you may find more Java apps. It's just much easier to get the systems up and running and the resource pool is enormous. C++ is still out there in business apps, but typically will be found where performance matters. C++ is also dominate in simulation and game programming as well as most military applications where you typically need more of a computer scientist than a Computer Information Systems major.
I did some research and here is some data on the number of projects on sourceforge in Java(dark blue) c++(pink) and c(yellow) in the various stages of development. Make of this what you will.
http://d.imagehost.org/0448/sourceforge_data.jpg
Grey Wolf wrote:
Argh! Here we go again....
LOL, Agreed
...the current architect only knows .net...

This here is the main reason C++ isn't dominating the market like it was. I'm fairly young, 24, and out of the three colleges in America that I've attended in the past 10 years the only one teaching C++ was my community college. The other two "programming" proffessors only knew C#, VisualBasic, Java, .Net etc. and they were shocked when I told them I had been learning C++ since I was about 12.

It comes down to economics, a school can train a capable C++ programmer in about 2 years worth of classes or they can train somebody that can do the same thing in half the time with C#. If you point out what a resource pig C# is compared to C++ they will point out that hardware is getting faster and cheaper everyday, and they are right. Also if the programmer you were hired to replace\assist wrote his stuff in C# then what good is C++?

Another reason is how bloated C++ has become, most of the time this is a good thing because no matter what you want to do I promise there is a library\header\dll or something out there for it. But just try to make video game graphics and you'll see he uses SDL, she uses SFML, they use Allegro, he uses OpenGL, he uses Open3D, he uses ActiveX ... AAAAARRRGGGGHHHHH!!!!! There is no industry standard for anything anymore so an employer cannot reliably hire an "Expert in C++" to upkeep or debug his software because it becomes too difficult to evaluate the new hires skill with what ever library his software is written in. Granted it isn't impossible and an employer who must do it will, but when the alternative is stuff like Java and C# where the labor pools knowledge is more consistant then they will play it safe everytime.
Last edited on
Oh man this seemed like an innocent question! Guess not!

Thanks for all the info guys.

@Return 0. Yeah that's true. I try to keep an open mind about programming languages but Java and C# are just too slow for what I do.
@ernestus. I respect your opinion but I don't really agree with the "C/C++" argument. The only reason I mentioned C/C++ is because you need to know C in order to be a good C++ programmer.
@Computergeek01. I know it's frustrating. SDL and OpenGL is the way to go. Spread the word!
@cnoeval. Isn't D too similar to C++ to replace it? I don't know. That's what I've heard.
@Kyon. good to know.
I am living proof that you don't have to know a thing about C to write well in C++ any more then you have to know assembly to write in C++. In fact I'll go one further and argue that learning C before learning C++ closes you off to the object orieneted goodness until you essentially unlearn C.

I agree with you about SDL but not all of OpenGL's extensions are "open" and I resent that fact. Anything aiming to support the opensource community should be ALL IN or they should GTFO.
Last edited on
Actually C++ and even C are still utterly dominant in contexts which require blazing speed and access to hardware, ex: video games. About finding developers, an employer can simply state in the requirements what library they use. "Looking for c++ developer with >2 years OpenGL and ActiveX experience." And to those who say that computers are getting faster: a language has no right to take away my speed, because I want to use those resources to give my customer more cool stuff to look at. If you use c# to make a cool game, I'll use c++ to make a game with better graphics and larger environments, because your .net runtime is eating your program's speed. Anyway .net could be fast if it actually had a linker to cut out some of the runtime. The problem is that cache misses make big programs slow, and your JRE or CLE makes a Java or c# program very, very big.
Yes I agree that C++ is faster then Java, C# or many of the others. But if I know that if my project will necessitate the hiring of more individuals in 5 years then I will activley work to make sure that the labor pool will be as large as I can make it, because I know that increased competition for that job will drive wages down. If that means using slower code now so as to cut costs in the future then from a profit driven developmental stand point I know to pick C#.

Also as I said before the colleges are focusing on C# and Java while paying lip service to the juggernaught that C++ should be. This means the projects you are likley to be hired to upkeep and trouble shoot in the next 10 years are more likely to be written in one of those languages or an offshoot there of.

I only know C++ by the way, I love this language and have no interest in learning Java, C# or D. But I'm a Sys Admin not a developer, so my opinion is based on what I see not what I experiance.
Last edited on
Since noone seems to be reacting on cnoeval's post about D (apart from the OP), I will. D is a nice language, though it lacks two important things; support and a community. The "merging" of C++, Python and Java is interesting, to say the least. It offers a wide variety of innovative tools, but I'm afraid this will only fall into the shadow of already widely-used languages.

D certainly is promising, but it's still questionable if it will be widely used. Finally, because of this you will probably only be able to create console applications and the like, since most API's don't support D (yet).
Hi guys

@ nick85 It is not an opinion, I will explain:

The fact is I am trying to move away from C++ because finding good programmers is difficult. It's kinda traumatic, C++ is my favorite language, I have been using it since 1994 and I do great stuff with it. I have shown results to people they thought were not possible in a high level language, it's amazingly expressive (or maybe I am so used to it it is just easy for me).

But I cannot write myself all the projects I am responsible for!!!!!!!!, and it is bl**dy difficult to find good developers (at least good enough). Recruitment agencies do their job less than nicely and flood me with candidates that don't pass the first filter because of that "C/C++" thing I said before (I phone them to have a quick techy chat, this is the 1st filter but too many make their way to the interviews), for them is difficult to filter a C++ programmer from C ones that know some C++. And that is, they know three C++ tricks and say they are C/C++ programmers. We are not cheap with our products, we need quality, so we offer good wages, but cannot fill the crew, sure there is a problem. I find really difficult digging the few real C++ guys out of the "C/C++" ones.

C++ is a different language, and learning C previously is a mistake. Actually the experience here is it is safer to teach C++ to a Java programmer than to a C programmer, even given the very different memory management, once they understand it, there is no problem and their code becomes very robust (hey, you can see them writing templates, using exceptions and patterns in their designs, that simple stuff saves lots of time).

C programmers tend to use what I call shortcuts all the time, shortcuts only understood by themselves, sometimes justified with the most peregrine reason, like saving some CPU clocks in an architecture that is more important to keep high cache hits (saves power and is faster) that having an extra indirect access, and things as keeping the several pipelines full is done very nicely by the compiler itself, don't mess with that. Use pointer arithmetic and shazam! most optimizations are gone. Don't blame them yet, all those optimizations make sense in a very RAM restricted environment (1K-2K), you don't want to use C++ there! but that is not our case. Even when they are tidy, they don't use exceptions at all and using the STL is like..., well I don't know, they prefer to implement the functionality themselves...

In the link I gave earlier:

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

You can see C++ peaked globally at 17.5% of the projects around 2003, since then it's been losing traction, now is around 9%. You can see yourself. I don't think I am the only one having this issue.

In short, I would like it to be my opinion but it's actually my problem.

Cheers

Last edited on
Hi ernestus, I agree quite fully with what you say. To some companies, it is not only about developing new products/software but also to get ppl to maintain your previously products/software that ALREADY have customers using it day in day out. You cannot simply cut them off by saying hey you need to obsolete what you are using and start using our newly developed product/software isn't it ? This is especially so when you charge a lot to the customers for your previous product/software.

In IT, we move with the times, getting developers for product/software maintenance is quite crucial and if your selection pool is small like say C/C++, you have some problem on hand isn't it ? In my country, a lot of advertised positions focus a lot on maintenance. They want developer to do maintenance. The same position advertised a few times indicate it is hard to fill that position isn't it ?

This is also why in my working career, I do maintenance 75% of the time and new software development 25% of the time. I guess that is why my employer employ me.

Doing maintenance IMHO is not easy. You read ppl's code try to decipher and with or without comments you struggle to capture the business logic. All this has to be done proper before you start to write enhancement code upon it!

C++ will still stay IMO but restrict to certain niche area like games, simulation, military, stock trading, betting, bidding, ticketing etc etc.
closed account (3pj6b7Xj)
LIke someone else said, use the right tool for the right job, one single man does not know every programming language in the world and possibly doesn't have the mentality to think as sharply as a programmer whos been C++ for years than some new C# grad out of college with 2 years of programming experience, a well experienced programmer can learn any language, once you understand the know how, the syntax and what is being tried to acomplish, it only takes a little time.

I don't know if people will agree with me on this or not but part of were companies fail is because they are so darn picky.

Can you compile a C# program in a MAC? Linux, Ubuntu? Maybe not but if its written in C++ and very well written, it can compile across all those platforms were as C# falls flat on its face.

To add to this, there are also programmers out there who are only in it for the money. They learn any language in the pursuit of making more money, I beleive everybody should but thats emotionally selfish to oneself. Wouldn't you instead hire someone who loves C# because they just simply love to program in that language....someone who is passionate about what they do is much better than some junkie looking at you with his hands open waiting for a paycheck at the end of the project.
Last edited on
Pages: 12