Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Are C and C++ Losing Ground?

Posted by Soulskill on Thursday April 24, @04:33PM
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
More | Login | Reply
Loading... please wait.
  • by KillerCow (213458) on Thursday April 24, @04:34PM (#23188964)
    But does Netcraft confirm it?
  • Always be there (Score:5, Insightful)

    by ohxten (1248800) on Thursday April 24, @04:35PM (#23188972) Homepage
    C/C++ will always be there. Period. Just look at all of the C/C++ projects on SourceForge. New languages will come and go, but C/C++ are just too stable to go so quickly.
    • by krog (25663) on Thursday April 24, @04:47PM (#23189158) Homepage
      C and C++ are entrenched, but it was never their stability which caused it. Computer languages are theoretical; one valid language is just as 'stable' as another. The real issue of stability lies in the implementation, and that is language-independent.

      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++.
    • Re:Always be there (Score:5, Insightful)

      by fyngyrz (762201) * on Thursday April 24, @04:47PM (#23189160) Homepage Journal

      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. ;-)

    • Re:Always be there (Score:5, Insightful)

      by SanityInAnarchy (655584) <ninja@slaphack.com> on Thursday April 24, @04:54PM (#23189278) Journal
      Assembly will always be there. Period.

      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".
    • by rishistar (662278) on Thursday April 24, @05:08PM (#23189468) Homepage
      C/C++ will always be there. Semi-Colon. There fixed that for you.
      • Re:not so.. (Score:5, Insightful)

        by ArcherB (796902) on Thursday April 24, @04:51PM (#23189246) Journal

        when we have internet that is as fast as cpu response times c and c++ will go the way of the dinosaur and the internet will be your main application platform and gaming platform, meaning game over for c and c++.
        As long as computers need an OS, C/C++ will be in wide use. All major OS's are written in C/C++ and will be for the foreseeable future.
  • I can handle C and C++ losing ground.

    But did anyone else find Visual Basic rising two spots to #3 past PHP & C++ to be a sure sign of the apocalypse?

    (Visual) Basic 11.699% +3.42% A
    Could someone reassure me that's a mistake before I go home to sit down with a bottle of Jack Daniels and a revolver with a single bullet in it?
  • by KlomDark (6370) on Thursday April 24, @04:36PM (#23188984) Homepage Journal
    I haven't written a line of code in C or C++ since I started with C# - C/C++ syntax with no tracking of memory (I detest tracking memory!!) except in the more obscure situations. Both .NET and Mono allow for C#, so you're not stuck on one platform.

    • by pclminion (145572) on Thursday April 24, @04:53PM (#23189274)

      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.

  • Dying...not hardly (Score:5, Insightful)

    by PalmKiller (174161) on Thursday April 24, @04:39PM (#23189026) Homepage
    I know I am gonna get flamed for this, but they said web programming, like its the only game out there. Sure its not web 2.0 friendly, and sure most web script kiddies don't use it...mainly because it don't hold their hand, but its far from dead when your are needing to squeeze every last ounce of power out of your hardware, or even that other 25-30% of it.
  • by Noodles (39504) on Thursday April 24, @04:41PM (#23189048)
    I develop desktop application software. Right now I wouldn't think about using anything else but C++.
  • For image processing (film/video), real-time audio or any serious signal processing, the overhead of anything but C/C++ is killer. It'll be news when Adobe After Effects or Autodesk Flame is rewritten in python.

    Besides, measuring the popularity of a language by the size of its web presence is the worst kind of fallacious reasoning.
  • by jythie (914043) on Thursday April 24, @04:48PM (#23189170)
    I could actually see C++ slowly going away over the next decade as it is replaced by other languages that fill the same needs but better. C on the other hand is probably going to be around for a long, long time.
  • Statistics (Score:5, Insightful)

    by Anonymous Coward on Thursday April 24, @04:48PM (#23189172)
    Measuring by internet web pages mentioning it? Can you say, "worthless statistic," kids? I write code that controls hardware. You bet it's C++. I write code that's IN the hardware. An interpreted language? Are you out of your damn mind? Do I blog about it? Don't be absurd. Am I generating "web presence" for it? Only on slashdot. Go away useless statistic.
  • 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.

  • Absolutely (Score:5, Funny)

    by DoofusOfDeath (636671) on Thursday April 24, @05:10PM (#23189492)

    Are C and C++ Losing Ground?

    Yes, but on the bright side, they lose ground about 1.5x faster than Java in most applications.

    • Re:so what? (Score:5, Insightful)

      by dreamchaser (49529) on Thursday April 24, @04:51PM (#23189234) Homepage Journal
      I consider a proper coder to be anyone who can write a proper flowchart and the pseudo-code/logic for their target application. It has nothing to do with the language they finally use to implement.

      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.
    • by pclminion (145572) on Thursday April 24, @04:57PM (#23189324)

      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.