Philistine question about the future of C++
Hi all,
this is a question that bugs me for a while now: Will there be any relevant development in C++ in the five years time? I am a fan of C++ and especially the STL and boost libraries, but I am seriously concerned, that I am barking up the wrong hollybush with Java's dominance in middleware development and ASP.NET's increasing share of front-end development.
IS THERE A FUTURE FOR C++?
I must be bored to even ask the question...
Cheers,
D
[486 byte] By [
drkybelk] at [2007-11-11 8:10:25]

# 1 Re: Philistine question about the future of C++
Its sort of an assumption that all software is web-based/network/database enabled now. It isnt. My company does not own a server, I dont really know what "middleware" is. I dont know what a "mainframe" is either, except in a broad sense. There will always be games, and C++ will continue to dominate there for years. There will always be embedded systems, numerical processing, operating systems, etc. There will always be a need for a little assembly programming, a little programming that bypasses OOP (yes, even the stl is a resource hog at times!) in favor of speed, etc. Considering that a new version of visual fortran came out not too long ago, I dont see anything happening to c++ anytime soon.
jonnin at 2007-11-11 21:01:37 >

# 2 Re: Philistine question about the future of C++
Keep up you interest - you know what is said about Fortran programmers, don't you?
On a more serious note - there are many platforms which need software, some more plentiful than desktops and servers on top of operating systems (compilers, operating systems, machine level, embedded systems), which will not be written in Java or C#.
nspils at 2007-11-11 21:02:37 >

# 3 Re: Philistine question about the future of C++
Thanks for your uplifting comments! ;-)
Unfortunately this poll will reach mostly C++ programmers and C++ programmers in the making, so the results won't be entirely fair.
@jonnin: Certainly the Unix/Linux - world is more resilient towards the recent changes, but in my experience there are a lot of legacy systems currently replaced. I work in a place where they use commandline Unix/Ingres/C/COBOL and VS6 (still) and there is no sign of that ever being replaced. But many of my contractor colleagues are now accepting ever further travel in order to find jobs (advertisements for contract roles now really focus on C#/.Net -> see www.jobserve.co.uk)
@nspils: I programmed in Fortran77 about 10 years ago and again there was so much legacy software, that there was no finacially viable option to replace it. But with tools to import the code into .Net and cross compile it into Intermediate Language and into say C# there might soon be a big rush away from Fortran/Cobol/QBasic and what else is around there... And with hardware ever more powerful and more integrated, with compilers ever more clever (although that might be open to discussion) the need for writing machine code might soon no longer be needed?
Cheers,
D
# 4 Re: Philistine question about the future of C++
I try to never underestimate the ingenuity of people who are trying to apply the tools they know (are trying to sell) to the tasks at hand. However, just because we CAN (taking advantage of more capable/numerous components) do something, does it mean that we SHOULD? The tug between polarities - what is elegant, what is easy, what works best, what works acceptably.
So much has occurred through the re-application of the process of abstraction. The Intermediate language construct is just another layer of abstraction. Will it (or other 4th generation constructs) wipe out the levels under it? I doubt it. I expect there will always be a need to "hand write/optimize" machine or near-machine level code.
That being said, the "new" "sexy" jobs will go to people hired by the managers who want to say they use the "new" "sexy" tools.
nspils at 2007-11-11 21:04:42 >

# 5 Re: Philistine question about the future of C++
You know, if I got a dolalr bill for every year in which C++ was buried, I could buy a small continent... More seriosuly, I can't see how ASP is any replacement for C++. If anything, C++ is in the same league as Java and the more recent C++/CLI which is a misleading name for a new programming language that looks like a sloppy hybridization between core C++ and C#. The problem with C# is that it's currently being revised extensively, so it's pretty immature and unstable. Java is the only language that can be considered a viable rival, although I find it lacking in many respects and the fact that most sofware these days is written for a single platform (i.e., portability isn't required) makes it less useful than it seems. Another factor: many programmers are simply unware of the amazing new features that TR1 offers, and C++0x in general is about to get. Once you learn about the lambda library, type traits, tuples and many other goodies, you'll see how lacking Java is in comparison. Finally, C++ nowadays has one prominent adavntage: generic programming. I'm not talking about the shameful "generics" hack that C# and Java recently adopted, but reall template based generic programming as is done in C++. Other languages are about a decade behind C++ in this area. You should also note that you're looking at a very simplified spectrum: applicatios that access a relational database and have an Internet interface of some sort. In this arena, Java is rather popular but I don't see how Java can become the leading language in embedded systems, math libraries, real time, system programming, low level stuff, etc.
As opposed to the common hype, I find very few genuine innovations and originality in the so called "sexy" programming languages. I prefer C++ and I believe it's simply a better programming language. Unlike Java and C# it doesn't have the backing of a commercial company that pours billions of dollars on propaganda but trust me: C++ will be relevant, very relevant, in 5 years. I have no doubt about it. 20 years from now? That I don't know. Then again, C# will have evaporated by then, I'm pretty certain about *that*.
Danny at 2007-11-11 21:05:35 >

# 6 Re: Philistine question about the future of C++
I'll throw my 0.02 in to this....
I think (hope) C++ will stick around. Coming from the engineering side of the spectrum, web stuff isn't all that important. In fact, many of the code I deal with is in fortran. The ability to mix c++/fortran code is very important to me.
As for getting older engineers (non-software) to use newer languages is like trying to make people use metric...it just ain't going to happen. I've got coworkers still writing spagehtti code. Trying to get them to learn OOP is just about as hard.
Another thing is that sometimes it's the hardware holding back the "sexy" toys. When you're forced to use a AIX machine... the latest and greatest don't mean a whole lot.
nspils: what's that they say about fortran programmers? I've not heard.
drkybelk: what's this about importing fortran code? you got my interest...
rssmps at 2007-11-11 21:06:40 >

# 7 Re: Philistine question about the future of C++
there is so much legacy code written in Fortran still being used that if you are competent in the language you can easily keep employed ...
nspils at 2007-11-11 21:07:38 >

# 8 Re: Philistine question about the future of C++
Its true enough -- most contract work is not controller design, gaming, os development, embedded numerics, etc. As I said, C++ has a place. Lets put it this way: imagine I selected java to do my linear algebra. I write a class to be a "matrix" and discover that I cannot even overload operators. So now, my code that used to be
X = !U * (A+B); //not (!) is overloaded to transpose for example
becomes:
X = Matrix.Multiply(U.Transpose() , Matrix.Add(A,B));
Or some such nonsense. This is not acceptable to me, its ugly, hard to read, and hard to write. Worse, as about 1/4 of my code was originally MATLAB scripts, translation went from (copy, paste, touch up) to (completely rewrite the code). Therefore, no matter how fast java becomes (its still marginally slower at best, by the way, making my life harder) and no matter how much "better" it supposedly is, I cannot use it for the task at hand. There is probably some matrix library or something, or a clean java way to do this. Its just an example, maybe not even a good one, but things like this are real issues. Throw in that the stuff I already have done, debugged, and optimized is in c++ however, starting a new project without my code base isnt a pretty prospect...
jonnin at 2007-11-11 21:08:42 >

# 9 Re: Philistine question about the future of C++
Oh and I have the latest Visual fortran. We just DLL it in that and call from the C++, its very easy to do. A couple of our aerospace guys only know fortran for some reason.
jonnin at 2007-11-11 21:09:46 >

# 10 Re: Philistine question about the future of C++
Oh and I have the latest Visual fortran. We just DLL it in that and call from the C++, its very easy to do. A couple of our aerospace guys only know fortran for some reason.
hey...what ver of VS and fortran do you have?
I've integreated CVF6.6 and VS6 w/o issues.
I'm currently working in VS2003 but have not gotten IVF9. Too bad VS2005 will not work with IVF.
I'm one of the aerospace guys. :WAVE:
fortran may keep you employed but it sure ain't sexy.... all the big bucks go to the web guys. :(
rssmps at 2007-11-11 21:10:46 >

# 11 Re: Philistine question about the future of C++
fortran may keep you employed but it sure ain't sexy.... all the big bucks go to the web guys.
Its a pity that isnt it.. :(
# 12 Re: Philistine question about the future of C++
And to think that Java designers removed operator overloading to simplify " the language. BTW, jonnin' sexample of
X = Matrix.Multiply(U.Transpose() , Matrix.Add(A,B));
is much more problematic than it seems. Overloaded operators are not just syntactic sugar. They are machine readable so C++ expressions that use overloaded operators are an essential component in any generic library. They sove a critical problem: naming convention. You know that a binary + means exactly one thing, and that's what your library has to know. If users have to name this as "Add", "add" "BinaryAdd" etc. you end up being in a Java situation.
As for performance: most peopl don't realize that while Java has made some progress in this area, in C++ there's been a quantum leap. The latest hardware arhcitectures and compilers are now able to move many runtime calculations to compile time. paradoxically, a C++ terminates before the JVM has even loaded...
Performance is very important, and is even going to be more important. That's exactly why Java patrons have been working so hard to improve this aspect of their language, but they will never reach the same performance of compiled C++.
Danny at 2007-11-11 21:12:48 >

# 13 Re: Philistine question about the future of C++
Wow time flies -- I lied, I have 2002 versions of CVF and .NET not the latest at all. They were the latest just the other day ...
jonnin at 2007-11-11 21:13:45 >
