PDA

View Full Version : Is C++ going to be around?



BMW-Guy
11-23-2004, 03:38 PM
Hey guys,

I'm brand-new to the C/C++ languages. I'm very interested in pursuing using C/C++ to create windows applications (and other stuff too) rather than use Visual-Basic.

I have one concern, though:

C++ has been around for a bit of time now. Please be honest: Do you think C/C++ will be obsolete in the very near future?

The reason I ask is because I don't want to quit my current progranming language (VB6) only to find out that within 5 years that C++ is being made obsolete.

I know no one can prodict the future, but I'm wondering if maybe you more experienced people could give me an honest answer. Thanks. :)

anonytmouse
11-23-2004, 03:51 PM
We do this topic frequently. The short answer is no. However, if you want to keep up to date in programming, you should be learning new topics and languages regularly.

Zach L.
11-23-2004, 03:52 PM
This has been discussed many times on the General Discussions board, so I advise you to do a search on the forums for this topic. To sum up, it is quite unlikely, and even if something miraculous and wonderful did come and replace it, there is a lot of C++ code already out there that needs to be maintained.

In short, no.

BMW-Guy
11-23-2004, 03:54 PM
Thank-you kindly for your responses. I apologize for not posting this (and for not first searching for previous posts here that would have answered my question). :)

Stack Overflow
11-23-2004, 04:04 PM
Hello,

How powerful is C++?
C++ is one of the most powerful language and will be used for a long time in the future inspite of emergence of Java. C++ runs extremely fast and is in fact 10 to 20 times FASTER than Java. Java runs very slow because it is a byte-code-interpreted language running on top of "virtual machine". Java runs faster with JIT (Just-In-Time) compiler, but it is still slower than C++. And optimized C++ program is about 3 to 4 times faster than Java (with JIT compiler). Then, why do people use Java? Because it is pure object oriented and is easier to program in Java, as Java automates memory management, and programmers do not directly deal with memory allocations.

Q. Is C++ too complicated?
A. I believe the language is complicated compared to Java, but in many respects it's more mature and powerful, maybe to a fault. Popular authors Andrew Koenig & Barbara Moo have been teaching C++ for many years and have learned valuable lessons about why the language is or seems complicated. For example, they now defer teaching pointers early and begin with STL, first to gain productivity and second to avoid getting stuck in a confusing topic.

Comparisons
Compare to other languages: Java, Python, Ruby, Smalltalk, and CLOS+AMOP have refactoring browsers available. Smalltalk and CLOS have several open source versions of the language available. Cross reference tools, class browsers, persistence mechanisms exist for other languages are much rarer for C++. All because the grammar of C++ is just too complex. (Worse look at Lisp where the language is much more complex than C++, yet people routinely build tools and libraries.)

Even aspect-oriented extensions. Yes there is the Czernacki and Eisenecker techniques, but for those techniques to really be useful in generic situations, compilers will have to do very heavy optimization of templates. Right now, with the grammar, so complicated many compiler vendors are happy just to compile the language correctly, much less do heavy optimization.)

Downfalls of C++


Lack of compliant compilers
Lack of competent programmers
Lack of tools
Lack of compliant compilers is true for any language. It's up to the vendor. Just as an example, it's often said that C is much simpler. But Standard C compiler didn't happen overnight. And the same is true for C99. It's only recently that the Comeau + Dinkumware solution is available.

Conclusion
All in all, C++ is a powerful language though yet complex. There are many reasons why C++ will last for a while, though not all the aspects can be covered in a short document.


- Stack Overflow

DougDbug
11-23-2004, 04:17 PM
C/C++ are the most popular languages by far. I don't know what the "market share" is, but I wouldn't be surprised if there are more (working) C & C++ programmers that all other programming languages combined!

Java and C# are really "hot" now, but I think they have a long way to catch-up.

Any professional programmer should know some C++. I don't know C# or Java, but I understand that they are both similar to C++. So, you're not wasting your time learning C++.

C/C++ may NOT be the most popular language for GUI/Windows programming... It is certainly not the easiest! My boss can whip-out a Visual Basic program in a couple of days... It would take me a couple of weeks in C++. (Neither of us are "real" full-time programmers.)

Graphics are not part of standard C++. You need to spend some time learning the underlying C++ language before moving-up to GUI programming.

neandrake
11-23-2004, 05:05 PM
I've heard that the reason c++ will be outdated by java is because of updating problems. When a programmer has to go in and update code, it's more difficult with the way the OOP is structured in c++ rather than java.

Just
11-23-2004, 07:15 PM
For the popularity/use of common programming languages, take a look at:

http://www.tiobe.com/tpci.htm

Zach L.
11-23-2004, 07:25 PM
It lists Postscript as a programming language?
Strange...

Stack Overflow
11-23-2004, 07:40 PM
Hi Zach,

PostScript is a programming language optimized for printing graphics and text (whether on paper, film, or CRT is immaterial). In the jargon of the day, it is a page description language.

The language itself, which is typically interpreted, is stack-based in the same manner as an RPN calculator. A program pushes arguments to an operator onto a stack and then invokes the operator.

I haven't really done much programming in this language, so I'm not sure what to expect.


- Stack Overflow

Zach L.
11-23-2004, 07:55 PM
I know what Postscript is (generally), I just wouldn't classify it along with C, C++, Java, Python, Perl, VB, etc, as the domains of application are rather disparate.

cgod
11-24-2004, 02:06 AM
Java and C are more "popular" than C++ because they are generally the first language a new programmer learns

jwenting
11-24-2004, 03:07 AM
and there we go again with the urban legend that C++ is 10+ times faster than Java.

That's simply no longer the case, if it ever was.

Sure I can write a C++ program that's faster than a Java program with the same functionality. But the reverse is also true, it all depends on the proficiency in either language of the programmers as well as in some small part on the required functionality.

If the program is extremely trivial the added loading time of the JVM might give you your number of 10-20 times, but for more non-trivial realworld applications a speed advantage of 1-5% is (using modern JVMs) more realistic and even that is overly pessimistic towards the performance of the Java code.

Will C++ be around?
Consider that the demise of Cobol has been hailed for the last 20 years and there's still strong demand for Cobol developers.
The demise of Java has been hailed since before the 1.0 was released now nearly 8 years ago and the number of people using it for real work is still growing rapidly.

Going outside of software development, the demise of the 120 format filmformat for cameras was predicted a century ago yet it looks more likely that it will survive the event that might yet end its supposed predecessor, the 35mm format.
Based on that C might survive C++ but that might take another 80 years :)

whackaxe
11-24-2004, 06:14 AM
if the pope can do it, so can C++ :)

Zach L.
11-24-2004, 08:34 AM
if the pope can do it, so can C++ :)
Hahahaha! :p

CornedBee
11-24-2004, 10:18 AM
The problem about the tiobe index is that it is about lines of code. While not necessarily greatly affecting the ratings, some difference will be there. It generally takes fewer lines to do the same in C++ than in C, thanks to the advanced features the language supports. And of course, functional languages like Haskell use even less lines.

Nyda
11-24-2004, 11:14 AM
Unless you are using your programming skills for a living I'd suggest to use whatever language+IDE suits your needs and doesn't require you to invest a lot of money.

It can be fun to write highly optimized C programs that don't do much besides doing the thing they do *fast* (i.e. image manipulation).
Just as much as it can be fun to write a small C# programm that does things you couldn't even have done with 10 times as much code in C.
Or do the same thing in D and realize that a good highlevel language doesn't neccessarily require a JIT ;) [It's probably the next thing for me to try...]

If you're the masochist-type of person, Scheme or another functional language might also be quite a lot of fun since it's so different from the mainstream.
Delphi (aka Pascal) is also an interesting language for quick and easy Windows development. Or just to see how fast Earth's fastest native-code compiler really is.

It's really all up to you. Just make sure you don't feel like being forced to use C++ because everyone else seems to be using it - because if you do, you won't get very far.

xErath
11-24-2004, 11:54 AM
How powerful is C++?
C++ is one of the most powerful language and will be used for a long time in the future inspite of emergence of Java. C++ runs extremely fast and is in fact 10 to 20 times FASTER than Java. Java runs very slow because it is a byte-code-interpreted language running on top of "virtual machine". Java runs faster with JIT (Just-In-Time) compiler, but it is still slower than C++. And optimized C++ program is about 3 to 4 times faster than Java (with JIT compiler). Then, why do people use Java? Because it is pure object oriented and is easier to program in Java, as Java automates memory management, and programmers do not directly deal with memory allocations.
http://www.idiom.com/~zilla/Computer/javaCbenchmark.html

I'm not saying that java's more faster. But traditionally people say java is slow, based on experiments with the regular Sun's J2SE SDK. IBM has high-eficiency virtual machines that, I far as I've eared, have similar behaviours as compiled C++, although I've never tested them myself.

CornedBee
11-24-2004, 11:58 AM
If you're the masochist-type of person, Scheme or another functional language might also be quite a lot of fun since it's so different from the mainstream.
They're definitely loads of fun, and once you've got over the initial "WTF is this about?" barrier, you don't even have to be masochistic.

EvBladeRunnervE
11-24-2004, 01:14 PM
They're definitely loads of fun, and once you've got over the initial "WTF is this about?" barrier, you don't even have to be masochistic.

Not to mention functional languages tend to be more useful in AI than procedural languages,or is it just that they are used more?

Davros
11-24-2004, 04:15 PM
>C++ is one of the most powerful language and will be used for a long time in the future inspite of emergence of Java

LOL!

Shouldn't it say:

"C++ is one of the most powerful language and will be used for a long time in the future despite the emergence of Java"

I don't mean to pick holes. Just thought it was funny.

Zach L.
11-24-2004, 05:20 PM
Scheme is awesome! You just gotta have an editor that'll match parens for you otherwise you might end up in the looney bin.