Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello everyone,
i'm a c++ learner, and recently faced certain questions regarding the future of programming.
which programming launguage will hold a superior position in the future ? or even now?
which programming launguage is more powerfull?
c++ or java? if neither, then which is ???
java is cross platform, but dose not have pointers and certain other vital features which are available in c++.
at the same time, java is cross platform, where as c++ is not.
recently an updated version of c++ has been released, called c++ 11.
it is not cross platform either!!!
i herd at&t is working on c++ 14 and c++ 17,
is it cross platform??? if not, why can't they just make it cross platform and make it the most powerfull programming launguage ever!!
why din't they make c++ cross platform? why is java so famous even though it lacks certain vital programming features, such as pointers.
which one should i learn ?
Posted
Updated 25-Aug-13 1:13am
v2
Comments
[no name] 25-Aug-13 7:17am    
"in the future", if we could predict the future somehow, we would have all most likely gotten the lottery numbers and won the lottery and would be sitting on the beach somewhere drinking Mai Tais. Learn the language that does what you want it to do on the platform that you choose to work with.
pasztorpisti 25-Aug-13 7:33am    
:thumbsup:
sid2x 26-Aug-13 5:57am    
Who the told you C++ is not cross-platform MingW for Windows, GCC for Linux, C4Droid for Android, XCode for Mac and numerous other OSes have C and C++ compilers....
Although the applications may not be portable.

Knowing more languages and platforms is better. I'm comfortable with both C++ and java with lots of experience. I've worked with C# too for a year. Learning any of these languages is a good invenstment since tons of legacy code guarantees your job probably for at least the next 10 years. If a miracle comes and these suddenly die out (that I doubt) then something new will come in place of these that you can simply learn. The true value of a software developer is not his experience with a language but his experience in software development. New languages and libraries always reuse the old stuff sometimes by taking a few steps forward or back...
 
Share this answer
 
We Klingon developers hold the future.

Today there are many many different programming languages, some of them very popular. Generally speaking a programming language is not superior to another: in specific scenarios a programming language might be better suited than another.
There are trends of course. For instance, most 'modern' languages have a garbage collector.

For starting, you might choose to learn a 'mainstream' language like C# or Java (C++ if you are also interested in performance :-) ).
 
Share this answer
 
This isn't really a "fair" question - it isn't one which has a meaningful answer in real terms.
It's a bit like asking "which is best, a Rolls Royce or a Ferrari?" - they are different things, intended for different purposes, and comparing them directly doesn't work. If you want a chauffeur, then the Roller is probably "better" for you, but the Ferrari is "better" for the chauffeur as he will have a lot more fun!

C++ and Java don't really compare either: they are generally used for different devices. Android app are nearly all "pure" java, while many PC apps are C++ and very few are Java.

Which is the future? Dunno. As The PhantomUpvoter has said, if we could predict the future, we likely wouldn't be here answering questions...

C++ is around twenty years old. But so is Java...so which will last the best? Nobody knows. COBOL is still in use out there and it's positively ancient!
 
Share this answer
 
1. Learning:
If you want to know which language to learn I strongly suggest C/C++ before Java. It is ridiculously easy to start programming in Java when you know C++, but the reverse is simply not true!

2. Future:
As for the future of either language: Since Oracle acquired Java, there have been lots of vulnerabilities in the Java engine, leading to a point where people start questioning the wisdom of using Java for *any* professional application. C/C++ doesn't suffer from such third party vulnerabilities. That isn't to say C/C++ programs can't have them too, it's just that a hacker breaking into the Java Virtual Machine that every Java program needs will breach the security of all Java programs, whereas a hacker breaking into a C/C++ program will breach only that program's security.

Considering the common move towards more security, make an educated guess as to which of the two languages still has a future in professional software development ...

3. Cross Platform:
Maybe you don't understand the term correctly: neither of these languages is platform dependend. Technically both languages are cross platform, but Java has the added advantage that you only need one distributable for all platforms, whereas you need to compile and link a C/C++ program for each platform individually. This will not change with future standards of C++.

Besides, while AT&T may develop new compiler versions, the language itself is developed by a committee consisting of Bjarne Stroustrup (the 'father' of C++), Herb Sutter (Microsoft), and many more highly qualified C++ experts.

4. 'fame'
Whether you experience Java as 'famous' greatly depends on where you're looking. Java is very well suited for internet applications, so when you look up information on the web, you naturally get the impression it's omnipresent and 'famous' like you said. In professional industry applications it is however pretty much nonexistant, unless the application heavily uses internet connectivity.


5. A few notes:
The lack of pointers is generally considered an advantage by most Java programmers: the main reason being that it also means a lack of one potential source of errors: memory leaks. This may be often be valid, but there are many cases where the lack of control over memory management may cause performance or resource bottlenecks.

That said, technically Java does have pointers - it just doesn't use C-like pointer syntax, so it all looks like simple stack variables to a casual observer.
 
Share this answer
 
Comments
A.U.K 1-Sep-13 10:08am    
thankx a lot, sir. this was very usefull :-)
Firstly Comparing Java with C++ is not a appropriate comparison. If you want to compare Java then compare it with C#.
Secondly No programming language holds the future Assembly was invented long back and still used in low-level tasks.
Now to your question
It matters where you want to develop and what you know.
C++ gaming engines are awesome for PC's examples : CryEngine
Whereas Java on Android is a good choice.
Java is simpler than C++ but is slow as mud.
Also Java requires a VM to run. And not to forget the most important point : It doesn't matter which language is awesome, but how much you know. Don't try to write complex and big programs in C++ if you don't know C++.
 
Share this answer
 
Comments
Stefan_Lang 27-Aug-13 9:11am    
Very good advice, but I disagree on Assembly: Assembly is plattform dependend and therefore will never be used in an application targeted for multiple platforms. Also C (not C++) is so close to assembly that there really is no reason to use the latter rather than the former. The advantage of a cross-plattform language and readable code is simply too much to give up in comparison to questionable performance gains.
1. You have misunderstanding on "cross-platform" thing. ANY high-level language standard is platform-agnostic. I.e., you can run VB in Linux :), if someone would bother to create appropriate API. What usually are NOT cross-platform - libraries and API. Java has limited abilities to use platform API directly, and regular developer usually interacts with pre-made libraries, which have same user-side API for most(or all) platforms. But price for this is pretty high - words "Java" and "performance" cannot exist together in the same sentence. With C++ situation is backwards - due to the historical reasons, user-side API on different platforms is different, so same code usually cannot be re-used on different platforms. For example, sockets syntax (and some of the ideology) is different for Win and Lin. Again, that's if we are talking about the code that interacts with OS-specific API. If we are talking about non-OS interaction (like algorithms, for example), then they can happily compile on any platform.

2. You comparing 2 procedural languages (C++ and Java). There are many other traditional procedural languages (VB, C#, Cobol, Perl, Python, etc), which all share same approach. I.e. you know one of them - you know the rest of them. Of course, there are quite a few details in each language that will give you sleepless nights, but in general - they are all the same. But, there are also languages that differ in their approach/ideology, where your habits will play against you. For example, "set" languages like SQL. Or, "solution finder" languages like Prolog or Lisp. Not to mention new generation of languages like Haskell. So, from this perspective, this question makes little sense - differences between C++ and Java are far less than, let's say, between Pascal and Prolog.

3. Now to the question that you probably meant to ask :) When someone asks about the future, most of the time they mean "what should I study that can bring me steady income and will not go out of fashion as soon as I finish studying?"
Yes, these days this is a very valid question. My answer is this: C++, if you count it's parent ("C") has been around 40+ years. It will stay around a lot more, as backbones of any OS should be fast enough to haul slow mammoths like Java :). But demand for it will continue to diminish - how often do you create new OS library or new game engine? On another hand, demand for Java-like languages will continue to rise, as someone need to create all these numerous fill-in Facebook-like forms. Yes, it's boring, but it's always a guaranteed bread (and sometimes with butter). So, make your own choice, which should be not about the language (one can easily pick up any in a very reasonable amount of time), but about WHAT you'd like to develop/deal with.
 
Share this answer
 
Comments
A.U.K 1-Sep-13 11:05am    
thank you, this was very usefull :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900