views:

4345

answers:

15

I wanted to know the future of C++. Now a days more languages are coming like D Language. I am curious to know the future of C++. Whether it will play the same role as it has been since from its inception. Does it play big role in parallel programming.

Please share your thoughts. Would be much glad to know.

See also

What is the future of C++?

C, C++, Java, what is next and what will it look like?

Will .net take over c/c++ any time?

Lasting influence of C++

What do you think about c++ after c++ox standard?

+2  A: 

I wouldn't worry that much. There is still a large C/C++ code base. Besides, languages never really disappear. (For example Cobol is still around, and with a reason).

But it is still wise to learn another language.

Gamecat
+16  A: 

C++ is still being actively updated. Check out the Wikipedia page for the next standard of C++.

Whether it will play the same role as it has been since from its inception. Does it play big role in parallel programming.

Well, it does play a great role in parallel programming. Often the reason to parallel program is to run code more quickly. Well, that's often why people use C++. So C++ fits in well here. IBM produces a library (which name I forgot right now) specifically to make this easy. Also, there is a highly regarded open source library called OpenMP that helps make parallel programming in C++ easier.

Will C++ play the same role it has since its inception? Not entirely. Many other languages have been developed that are better designed for certain situations. But C++ will still be a great multi-paradigm language -- greater in fact with the new additions. Some things will hopefully be even easier -- like using the keyword 'auto' to let the compiler figure out the data type of a variable.

I hope this helps a little bit.

Kevin
Thanks kevin for pointing out OpenMP :)
mahesh
OpenMP is a big pile of goo if you ask me. It tries to abstract multi-threading in a not-so convenient way. It's also incredibly complex for everything but the most trivial case and it feels more like a hack for existing software (oh! this loop should be parallel) than a solid MT architecture.
Jasper Bekkers
MT programming in C/C++ is absurd. Threading does not integrate well with anything C/C++ toolchains provide : the compiler can't help you whatsoever with race conditions or deadlocks, and can't even offer guarantees about generated code. Hacks over hacks never lead to anywhere safe...
bltxd
Even with the standardization committee attempting to clean things up, you'll never have any assistance from the compilers...
bltxd
openmp isn't the best architecture for some applications, but the fact that it is _very_ easy to bolt is the whole reason people use it. Multithreaded programming is hard in all languages, just like exception safe programming is hard in all languages.
Greg Rogers
Building Blocks is the library from IBM.
Klaim
@blue.tuxedo.myopenid.com : Is MT a "C++ only" problem? While I'm not a MT guru, AFAIK, MT is hard on every language... Like OOP in the past, MT is a mindset developers must tame. And as for for "you'll never have any assistance from the compilers", people said no one would ever walk on the moon...
paercebal
People that bash programming multi-threaded application in C++ as absurd, please Google Intel Threading Building Block.
ShaChris23
+7  A: 

Welcome to the World of Tomorrow!

C++ 0x FAQ

Ubiquitous
+1 for mentioning it, but we won't likely be using C++ 0x, until around 2014, I mean compiler support, enterprise decisions, programmer education, etc... it'll take at least 5 years to really be incorporated in most shops
Robert Gould
I meant 'Tomorrow' in the Futurama sense and not the Tuesday sense. But point well taken; by the time C++ 0x becomes robust, there will be other options that will be more suitable for some problems.
Ubiquitous
@Robert Gould "but we won't likely be using C++ 0x, until around 2014" That's an absurd - when you generalize do it smart :) We're already using C++0x. Surprised? :)
Piotr Dobrogost
+1  A: 

Ultimately, of course, death. The language will eventually die, so will the developers.

Now, when - that is the question. In quite some areas C++ (or C) is still pretty much the only sane choice.

NeARAZ
And so will the solar system and ultimately the universe. Therefore, C#, Java, Perl, and yes even Ruby and Python will all die. <sniff>
Kevin
Latin isn't dead yet ;)
Robert Gould
Nor is FORTRAN ;-)
Jasper Bekkers
@Kevin : crazy answer ;)
mahesh
great opinion, Kevin
chester89
+6  A: 

Did you look at the Linux-community? How about operating systems? Large software for office/gaming/design?

C/C++ is a very current technology to create fast and comprehensive software. There are so many libraries for any work to to, which are tweaked (memory and speed) and safe...

But the roles, the languages are playing in our huge world of development, are varying the whole time. You should learn and do whatever you think it is worth of.

joki
+4  A: 

Check out Bjarne Stroustrup's (creator of C++) CPSC 689 – C++0X – Spring 2009 course outline for the new C++ standard at Texas A&M.

caglarozdag
+3  A: 

As C is a subset of C++ and pratically everything you use day to day is written in C.

Then the answer is for at least the next 20 years.

Linux, The core Windows OS, your TCP/IP stack, your Java compiler and virtual machine, your php, python, perl, TCL etc. interpreter are all written in plain C.

C++ is used extensively for building newer components (mono, Gnome, most of the Windows api.) which will be around for a long long time.

If speed or the size of your executable are important C or C++ is the only viable choice. On some platforms assembly language is still an option, but, C has been so succesful at replacing assembly code that many platforms dont have a well supported assembler environment.

James Anderson
"everything you use day to day is written in C" - this is just false and stupid. I'd argue that anything other than the OS is c++.
shoosh
Gnome is in C, as far as I know. KDE is a better candidate here, or say the full of Qt.
Adeel Ansari
I use the OS more than any program on a day to day basis...
Greg Rogers
+9  A: 

In my view, C++ is a dead end. There is no way of getting rid of it because too much software has been written in it (or C, which is accessible easily from C++) and the alternatives are not wide-spread or have other disadvantages, but there also aren't many possibilities left to repair C++'s deficits.

C++ never had a clean design, but was originally designed to be a object-oriented extension of C. Therefore it always had to be a real superset of C and couldn't repair any C design faults.
And whenever Stroustrup discovered that he had made another mistake and reached another dead end, he hardly ever repaired something that was broken by design, but added another, new feature to the language that wasn't a full replacement for the broken features, worked in some cases where the first solution didn't, but had different disadvantages.

The result is a language that has got a complexity that overburdens most programmers using it, with some of them being aware of that fact and most beliving that so many errors are "normal" in computer programming. Therefore there can't be much more to come because it is difficult to build larger systems in C++ than done today.

Most tries to improve C++, like boost (a possible future C++ standard library) keep repeating the mistakes already made in the current library (fragility, missing naming conventions, ...), adding more complexity to the language. It is also impossible to repair current deficits because it would break backwards compatibility.

Don't get me wrong, I do programming for a living, most of it being C and C++, but I've also worked with loads of other languages and environments, e.g. Delphi (Object Pascal), for years and can compare. I make good money with C and C++ programming, more than I would get for most Delphi or Java jobs, and I believe that this is the case because not many people are able to write software in these C languages that works reliably (well, at least most of the time ;-)).

If it is desired to extend C in an object-oriented way (which doesn't answer the question if this is desirable at all because C already has enough disadvantages), it should be done like NeXt (now Apple) did with Objective C.

mh
I feel your pain, just spent all day trying to fix aliasing issues, oh my... anyways I think I've grown accustomed to the pain, it's definitely a relation of bondage between C++ and most Programmers X)
Robert Gould
I cannot disagree more. And I use C++,C#,Python, and other different langages everyday and the only real problem i see with C++ is that it's hard to "learn and master", that is the cost of "efficiency by default". Other languages only enhance on other sides, like easy adoption. You forget c++0x too.
Klaim
I'm just curious... Could you elaborate about gratuitous assertions like "Most tries to improve C++, like boost (...) keep repeating the mistakes already made in the current library (fragility, missing naming conventions, ...)"...
paercebal
@Klaim: I see exactly the same problem. Only that I wouldn't call it efficiency if a language generates more complexity than >90% of the programmers using it can handle. For me efficiency means to solve a problem solidly and with minimum efford. C++ is suboptimal for both.
mh
@paercebal: Impossible in 300 chars; I'll try. In my view, the most important task in programming is reduction of complexity. But the semantics of many C++ features (templates, operator overloading, ...) and names in many libs add lots of avoidable complexity and fragility and so work against this.
mh
I think any programming languages are just tools. Given a problem, we find the right tool to solve the problem. Same thing with C++. Just because it has many features doesn't mean that you have to use them all.
ShaChris23
+7  A: 

This subject seems to me already well covered extensively in other questions. See:

C, C++, Java, what is next and what will it look like?

Will .net take over c/c++ any time?

Lasting influence of C++

What do you think about c++ after c++ox standard?

Suma
A: 

The future C++ will be what COBOL is now. Still tons of it around, but not exactly preferred for new development (except in very specific cases).

Brian Knoblauch
+8  A: 

No matter what the anti-C++ camp says, C++ is a language that is going to last at least as long as C. In fact, it might even outlast C, mostly due to the fact that C++ is still being actively updated and developed.

If you're one of the people who think new software is not being developed in C++, check out the KDE project, the Haiku OS and Mozilla Gecko (for a start). Then check out the various C++ libraries and toolkits that are thriving.

Nope. Love it or hate it, C++ is here to stay. What developers need to do to stay sane is to pick and choose only those language features that suit their project and leave out the rest.

General Maximus
+3  A: 

The answer comes from Danny Kalev himself in his Predictions for 2018, Part II article.

With respect to C++, the impact of certain C++09 revolutionary features such as concepts, concurrency and rvalue-references will make C++ an ideal language for generic programming. The term "generic programming" will have become old-fashioned by 2018, since software in the next 5 years or so will be mostly generic anyway. However, the growing complexity of C++ will create pressure towards splitting the language into quasi-official dialects. We can already see this trend today; it will probably intensify in the future. No doubt, the next decade is going to be interesting!

Comptrol
+4  A: 

well, no matter how good, java, .net, ruby, phython etc get..

somebody will have to write the jvms/runtimes/interpreters/operating systems for that, and most likely this will still take place in c/c++/asm.

it would be a shame if we look back in 20 years and decide, no we can no longer invent any new programming paradigm, because noone knows how to code without an interpreter.

Andreas Petersson
+2  A: 

D language should be the future.

alvatar
+2  A: 

Check this out for C++ love: http://code.msdn.microsoft.com/Hilo

Creative Fisher