Slashdot Mirror


Is D an Underrated Programming Language?

Nerval's Lobster writes: While some programming languages achieved early success only to fall by the wayside (e.g., Delphi), one language that has quietly gained popularity is D, which now ranks 35 in the most recent Tiobe Index. Inspired by C++, D is a general-purpose systems and applications language that's similar to C and C++ in its syntax; it supports procedural, object-oriented, metaprogramming, concurrent and functional programming. D's syntax is simpler and more readable than C++, mainly because D creator Walter Bright developed several C and C++ compilers and is familiar with the subtleties of both languages. D's advocates argue that the language is well thought-out, avoiding many of the complexities encountered with modern C++ programming. So shouldn't it be more popular? The languages with the biggest gains this time around include JavaScript, PL/SQL, Perl, VB, and COBOL. (Yes, COBOL.) The biggest drops belonged to the six most popular languages: Objective-C, C, Java, C++, PHP, and C#.

9 of 386 comments (clear)

  1. The thing about new languages... by Lab+Rat+Jason · · Score: 4, Insightful

    ... is that they need to be better than old ones. Not just objectively better, but measurably better. And not just measurably better, but with enough margin as to offset the cost of learning a new language... I'm not going to ditch C++ just to learn D unless someone is paying me to. Show me the money!

    --
    Which has more power: the hammer, or the anvil?
    1. Re:The thing about new languages... by Anonymous Coward · · Score: 5, Insightful

      And that's just on a personal level.

      On a business level you've got to offset the risk associated with using a less known language with probably a much smaller toolstack around it, a smaller pool of available developers, and a less certain future. There has to be a very compelling reason for a business to not just go with c++ or java or .NET.

  2. Re:COBOL by Anonymous Coward · · Score: 4, Insightful

    English isn't a particularly nice language. It has one big advantage over other languages though. Can you figure out what it is?

  3. Why D isn't more popular by dentin · · Score: 4, Insightful

    I've looked at D before. It looks promising, and I've considered using it. The reason I don't is a bad reason, but it's the most common bad reason: legacy code.

    I have two hundred and sixty four thousand lines of code in my personal project/library archive (my own code, not counting custom versions of external packages like openssl and portaudio), all in C/C++, all with a unified build system, that's been ported and debugged on serveral platforms. Every new project I start uses those core libraries and header files. When I think about switching to a new language, my biggest concerns are how new code will integrate with my existing, how the new language will make use of my existing libraries, and how to remain productive in a dual language environment. The long term gain might eventually make it worthwhile - but it might also just cost me time should the new language die out or not support a platform I need it to.

    I simply can't justify the gamble.

    --
    Alter Aeon Multiclass MUD - http://www.alteraeon.com
  4. Re:Problems in C++ by linuxrocks123 · · Score: 4, Insightful

    1. Dude ... if you want to query the size of an array, use a vector. No, it doesn't make your code less readable. And, no, you don't have to use .at() everywhere: C++ has this thing called operator overloading. Maybe you've heard of it. You can use array syntax with vectors. Use vectors.

    2. I'd like to know what functionality you think you need string.h for when using C++ strings. I've found the standard library string type quite feature-complete.

    3. C++ isn't an interpreted language; of course it won't have much reflection.

    4. Forward declarations are not for saving the compiler time. They are for declaring a linkage interface with external code. If you ever even thought seriously about writing a C++ compiler you would know the language is not designed to make doing so easy.

    5. C++11 is awesome. Any old language will have some cruft, but C++ has managed to keep it where you don't run into the cruft unless you're dealing with old code. That's the best you can hope for.

    --
    vi ~/.emacs # I'm probably going to Hell for this.
  5. Re:COBOL by Yaztromo · · Score: 4, Insightful

    ok .. go ahead and name one language that isn't about domination and oppression. just one.

    Esperanto.

    Yaz

  6. Re:COBOL by DuckDodgers · · Score: 3, Insightful

    The only power of C and C++ that D doesn't provide is seamless integration with existing C and C++ code. And that's a big obstacle - in most cases, if you're doing serious C or C++ programming you've got thousands or millions of lines of code in libraries at your disposal. D can interface pretty easily with the C, but not as easily with C++.

    Otherwise, it's likely that every feature you care about in C and C++ is available in D.

  7. Re:COBOL by disambiguated · · Score: 2, Insightful

    C++ is an underrated programming language. The central organizing principle of C++ is that you only pay for what you use. Don't need garbage collection? Don't use one. Don't need exception handling? Don't use them. Don't need RTTI? Don't use it. Etc, etc. If you want to use it like C, but with a few syntactic niceties, you can. It may be a "kitchen sink" of programming languages, but that's a feature if you can use what you want without paying for what you don't want. Despite all the complaints and trash-talk, it's popularity is well-deserved.

  8. Re:COBOL by Tough+Love · · Score: 2, Insightful

    No, it means the GP doesn't know what he's talking about.

    --
    When all you have is a hammer, every problem starts to look like a thumb.