Friday, April 25, 2008

C/C++ Top of the Heap, Sort of

The latest TIOBE Programming Community Index has been released. I don't put a lot of weight into surveys like this, especially if I don't know the methodology behind it. As far as I can tell it's based on the popularity of different programming languages as found on the web. I guess it's an all right measure and it co-incides somewhat with my personal observations.

At any rate, Java comes out on top with a 20% rating which is up 2% from a year ago which is healthy. I'd like to believe the popularity of Eclipse as a tools and application platform has something to do with that.

C was second at close to 15% which is down 1/4%. I still see a whole lot of C, especially in the GNU/Linux community. Almost everything there is still C. And, of course, C is still huge in embedded.

C++ was fifth at close to 10% and a drop of 3/4%. I think C++'s complexity is really hurting it. C++ is built for large scale applications. But Java and C#/VisualBasic (which are 8th and 3rd in the ranking) with their automated memory management are probably better suited for that. Which is too bad since I still believe C++ with its generic programming support is still the most powerful language in common use today.

One thing to consider is that the two languages that CDT supports add up to 25% which makes it top of the heap (see, you can craft any message you want with stats :). But it is pretty obvious that JDT has much more share of the Java market than we do with the C/C++ market. But we're trying.

One thing I did notice with this survey too is that the variety of languages being used is growing over the last five years. I wonder if that speaks to unrest we're having with the languages we have at our disposal. C++ is too complicated, Java is too simple, C doesn't scale, C# is too Microsoft, Basic is too, well, basic. I think the time is coming for something new to rejuvenate us like objects did two decades ago. I wonder what it'll be.

11 comments:

  1. Functional Programming? Functional programming predates objects. It had it's chance. I'm not sure what's changed to make it all of a sudden the next big thing.

    No, I'm thinking a whole new paradigm is in order to match the multi-core/multi-threaded world we're in now. And I'm sure we'll use all we've learned from all the programming paradigms we've used in the past and keep the best ideas and add in the new.

    ReplyDelete
  2. Why disregard functional programming so quickly? FP features are available in many modern languages. Ruby, Python, Smalltalk and Javascript have it. Scala, F# and Erlang embrace it. Even Java and C++ are evolving to include it by adding things like type inference and closures in upcoming versions.

    I don't know what the next big language is, but I bet it will have at least some FP features. These days its starting to get hard to find a language that doesn't. And guess what one of FP's biggest strengths is... concurrent programming.

    You should try learning it. I bet you'll feel rejuvenated.

    ReplyDelete
  3. Objective C is probably a better choice than C++ these days; it has the power of C but with an object model closer to Smalltalk's. And in 2.0 you get to manage memory automatically, although the use of AutoReleasePools have always made manual management easier than C++. It's a pity that CDT doesn't support it ...

    ReplyDelete
  4. Another point. The C++ template meta-langauge, which you believe is the most powerful language feature in common use today, is actually a functional programming language.

    ReplyDelete
  5. You can do functional programming in C for that matter. You can probably do functional programming in PHP.

    At the end of the day, the language that solves a problem in a way that makes programmers more productive and produce better quality software than current languages do today will have a shot at being the next big thing. And even that doesn't guarantee acceptance with the programming community. A lot of great ideas have failed because they were too difficult for the average programmer to deal with.

    ReplyDelete
  6. I doubt we need another general purpose language. It seems more likely that domain specific languages will carve out higher level abstractions better suited for expressing solutions to specific types of problems. If we don't evolve towards expressing our designs with higher level abstractions, we'll just spend a good chunk of our productive time writing quick sort, and every other utility, in every new language. And each time the premise will be, look how clean and wonderful it appears!

    ReplyDelete
  7. Maybe you can fake some hacky approximation of functional programming in C like how you can fake 00 in C. But thats not the same thing as having the language actually directly support the concepts. I believe that it will become the norm for languages to directly support at least closures.

    But I agree that the difficulty in understanding some FP concepts has hindered its wider acceptance. But I also think that's changing as these features become more common.

    ReplyDelete
  8. I'm surprised to see procedural languages is at 42.6% considering most of the languages in the list are OO. Doesn't sound right to me.

    ReplyDelete
  9. Part of me hopes that Scala will be the next big language, but it's not perfect and perhaps there could be something even better. But even if Scala isn't it, I think the "NBL" will mix FP and OOP very much like Scala does and will also be statically typed. I see no other way to achieve similar productivity + safety.
    Scala is complicated, but not C++ complicated, and highly consistent. Everything is an object, and almost everything is a function (where it makes sense). It allows some more complex constructs than Java, and requires about 2 times less code to do the same thing. It scales, both down to scripts and up to systems (the name comes from "scalable language"). As a scripting language it is as readable and concise as Ruby, but 10s or 100s of times faster. As a systems language it is practically as fast as Java (there are a few caveats), but makes the code much more readable.

    Of course, a completely new paradigm is always possible, but at the moment I'm betting on Scala or something Scala-like.

    ReplyDelete