Slashdot Log In
Are C and C++ Losing Ground?
Posted by
Soulskill
on Thursday April 24, @04:33PM
from the lots-of-ground-to-lose dept.
from the lots-of-ground-to-lose dept.
Pickens writes "Dr. Dobbs has an interesting interview with Paul Jansen, the managing director of TIOBE Software, about the Programming Community Index, which measures the popularity of programming languages by monitoring their web presence. Since the TIOBE index has been published now for more than 6 years, it gives an interesting picture about trends in the usage of programming languages. Jansen says not much has affected the top ten programming languages in the last five years, with only Python entering the top 10 (replacing COBOL), but C and C++ are definitely losing ground. 'Languages without automated garbage collection are getting out of fashion,' says Jansen. 'The chance of running into all kinds of memory problems is gradually outweighing the performance penalty you have to pay for garbage collection.'"
Related Stories
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.

C/C++ is dying! (Score:5, Funny)
Reply to This
Re:C/C++ is dying! (Score:5, Funny)
No, but Stroustrup himself is reputed to have apologized for C++ as far back as 1998.
"It was only supposed to be a joke, I never thought people would take the book seriously." :)
- From the lost tapes of the legendary IEEE interview [nao.ac.jp] of 1998
Reply to This
Parent
Re:C/C++ is dying! (Score:5, Informative)
2. C........14.7%
3. VB.......11.6%
4. PHP......10.3%
5. C++.......9.9%
6. Perl......5.9%
7. Python....4.5%
8. C#........3.8%
9. Ruby......2.9%
10. Delphi...2.7%
The other 10 in the top 20 are:
JavaScript, D, PL/SQL, SAS, Pascal, Lisp/Scheme, FoxPro/xBase, COBOL, Ada, and ColdFusion
Reply to This
Parent
Re:C/C++ is dying! (Score:5, Funny)
1. Java
2. C
4. PHP
5. C++
6. Perl
7. Python
8. C#
9. Ruby
10.Delphi
Please note, there is no language in the 3rd position this year. Seriously.
Reply to This
Parent
Always be there (Score:5, Insightful)
Reply to This
That's a broken way to think of it (Score:5, Insightful)
Anyway, C is going to stick around because it is the most superb assembly language developed by man. C++ will of course stay around as well, but by modern standards it fails as a "high-level" language. The ceiling got a lot higher in the intervening 20 years; other languages reach much higher in a very useful way. I'd be happy to see less C++.
Reply to This
Parent
Re:That's a broken way to think of it (Score:5, Insightful)
Mind you, I don't think anything else is really set up for it either (Erlang?) but that's going to be the next big challenge.
Reply to This
Parent
Re:Always be there (Score:5, Insightful)
C is perfectly capable of extremely high-quality memory management with significant ease-of-use. However, you get to create that facility, or of course you can utilize someone else's design if you can locate one that fits your API needs, budget and time frame.
For instance, years ago I faced this issue and wrote a module that ensures there are no leaks in any part of an application I write; I also get over-run and under-run detection, named segments, dual-free attempt capture, memory usage reporting, and more. I have debug and end-user levels for the code so that during development, I get enormous detail, while the end user doesn't see that unless I specifically turn it on for them.
I have both pool and chunk level management; I have both pool and individual "free" levels; all of this in very few K indeed.
C is the perfect language to implement memory management in, in fact, because it has perfect fine-grained control over memory.
That goes for other things as well; C is highly capable if you need to build in certain types of OO; objects with built-in methods and variables can be crafted in seconds, with no waste at all; uniform list handling can be crafted (and is an interesting and useful programming exercise.)
C *could* go away as a result of a generation of programmers who really don't know how to deal with such things, but I think it would be a real loss if it happened. The up side is that it'll take a while. There's a whole generation of us who know C quite well, and we're nowhere near dead yet. ;-)
Reply to This
Parent
Re:Always be there (Score:5, Insightful)
However, you get to create that facility
s/get to/must/
Seriously, most people want to sit down and write the logic for their application, not invent (or even copy-paste) memory management schemes.
Reply to This
Parent
Re:Always be there (Score:5, Insightful)
That doesn't mean it will be particularly popular, or very likely that you can get a job in doing nothing but assembly programming.
Really, with C especially, just about every advantage it has over more modern languages are advantages that C itself has over assembly. Assembly is still needed, but no one in their right mind would, say, write an entire OS in assembly.
The day is coming when no one in their right mind will write an entire OS in C or C++, or even an entire OS kernel -- depending on your definition of "kernel".
Reply to This
Parent
Re:Always be there (Score:5, Funny)
Reply to This
Parent
Re:not so.. (Score:5, Insightful)
Reply to This
Parent
Visual Basic at #3? (Score:5, Funny)
But did anyone else find Visual Basic rising two spots to #3 past PHP & C++ to be a sure sign of the apocalypse?
Reply to This
Re:Visual Basic at #3? (Score:5, Funny)
Reply to This
Parent
Managed code is the way to go (Score:5, Interesting)
Reply to This
Re:Managed code is the way to go (Score:5, Insightful)
I'm not sure why you feel you need to "track memory" in C++. I did an analysis of all the code I've written a year or so ago, and I found that there is approximately one usage of a pointer in every 5700 lines of code (the way I write it, at least).
We have this great stuff called containers and RAII. And for when you absolutely must, must use a pointer, you have boost::scoped_ptr and boost::shared_ptr. I have not coded a memory leak or buffer overrun in C++ in over six years.
The best way to not leak memory is to never allocate it in the first place. The best way to avoid overflowing raw buffers is to not use raw buffers. Use the containers. When you think you can't, think harder.
Reply to This
Parent
Dying...not hardly (Score:5, Insightful)
Reply to This
What about desktop presence? (Score:5, Insightful)
Reply to This
For performance-critical code there is no choice (Score:5, Insightful)
Besides, measuring the popularity of a language by the size of its web presence is the worst kind of fallacious reasoning.
Reply to This
C and C++ might die at different rates. (Score:5, Insightful)
Reply to This
Statistics (Score:5, Insightful)
Reply to This
Different markets - different requirements (Score:5, Interesting)
What I love about such studies is that they can confirm any theory you want.
Truth remains that every particular market has requirements which dictate selection of languages.
I doubt that telecom industry (as it is right now) would ever get over C or C++. Just like kernel or system libraries in anything else but C.
If you look at rise of Web - and pleiades of supporting it languages - then both C/C++ are out of question of course. Though again I can hardly imaging Apache or MySQL or PHP being written in anything else but C or C++.
Market for system and telecom programming is definitely shrinking - and consequently their languages. Other markets are now blooming - and their languages are becoming more popular.
My point is that the languages are complementing - they are not competing. After all you have to write hardware, firmware and OS first. Only then your beloved automated garbage collection has possibility to kicks in.
Reply to This
Absolutely (Score:5, Funny)
Yes, but on the bright side, they lose ground about 1.5x faster than Java in most applications.
Reply to This
Re:so what? (Score:5, Insightful)
That being said, I agree with you otherwise. The first thing I thought of when I read the summary was 'lazy coders' when garbage collection was cited as a driving factor. That's the sad fact; many of the kids being cranked out of schools today can't code their way out of a paper bag without a compiler/interpreter that does most of the dirty work for them.
Yeah I know. Get off my lawn.
Reply to This
Parent
Re:C++ is as good as C# _if_ used correctly. (Score:5, Insightful)
GC is available for C++, but IMHO inappropriate. One of the great advantages of C++ is that the construction/destruction mechanism, along with automatic variables, gives you absolute control of the lifetime of every single resource. Whereas a garbage collected language like Java gives you absolutely no control over when (if ever) an object is destructed. I think it is a little wacky to give up this total control of object lifetimes in return for such a puny benefit, a benefit which could easily be achieved through C++ resource management techniques like RAII.
And anyway, garbage collection is irrelevant if you never "new" anything in the first place.
Reply to This
Parent