Slashdot Mirror


What Makes a Programming Language Successful?

danielstoner writes "The article '13 reasons why Ruby, Python and the gang will push Java to die... of old age' makes an interesting analysis of the programming languages battling for a place in programmers' minds. What really makes a language popular? What really makes a language 'good'? What is success for a programming language? Can we say COBOL is a successful language? What about Ruby, Python, etc?"

14 of 1,119 comments (clear)

  1. Re:Aging Engineers by ardor · · Score: 4, Informative

    I mean 1,000 lines of C++ and C# compared... I'd expect to see fewer errors in the C# and less severe errors when I find them.

    Depends on your skills. C# is a safer environment, but C++ has immensely more expressive power. With modern and well-coded C++, these 1,000 lines may equal to 10-20,000 lines of C#/Java. Unfortunately, the ugly C++ syntax and its C cruft make unlocking the true advantages of C++ a black art.

    A trivial example is the STL. Java/C# containers don't come even close to the STL's power. Go further and look at Boost.MPL/Fusion/Proto, and you'll see stuff you simply cannot do with Java/C#.

    Well. If it were by me, Lisp would be king. But its not a perfect world :)

    --
    This sig does not contain any SCO code.
  2. Re:Perhaps a better measurement than /. popularity by ardor · · Score: 4, Informative

    Repeat after me:

    C++ is NOT a "Microsoft language".

    --
    This sig does not contain any SCO code.
  3. Grace Hopper & John Backus didnt have by peter303 · · Score: 3, Informative

    John McCarthy did. They were inventors of COBOL, FORTRAN and LISP - three languages still in use from the 1950s.

  4. Re:I don't really get the Java hate around here by Em+Ellel · · Score: 4, Informative

    > is (mostly) consistent with itself

    Are you serious? Where I work, we regularly use at least three Java applications, and each one requires a particular version of Java, none of which are the same. One of them requires Java 1.5, while another one will break completely if Java 1.5 is installed. It's a nightmare! And while yes, the version requirements may be the fault of the developers, the fact that it can happen at all is unacceptable. Erm, you must be running windows and don't have a sysadmin with a clue. You can run as many versions of JDK in parallel as you want and they will not interfere with each other. Its not rocket science, just set a few env variables. Thats actually one of my favorite things about Java - you are never tied to a "system" install of JVM - in fact you don't even need root privileges to install JVM.

    -Em
    --
    RelevantElephants: A Somatic WebComic...
  5. Re:Off the top of my head? by Schadrach · · Score: 5, Informative

    Need code that you KNOW has no errors aside from logic errors on the part of the programmer? Use Ada. That's really where Ada fits. You can do very little wrong without the compiler screaming at you and then failing to compile. Like as in, things that cause C "warnings" cause Ada to fail compilation until you fix it. Need to rapidly produce major components, and easily wrap C for the lower level, more performance intensive stuff? Use Python. No, really. That seems to be Python's main niche. It's a great language for writing large blocks of program logic very quickly, is poor at low-level stuff, but can trivially wrap C to do the things it is very poor at.

  6. Re:Off the top of my head? by p3d0 · · Score: 3, Informative

    I'm mainly a C hacker, but I don't get why people would prefer Python over Java. Assuming that's an honest question...

    I wouldn't write a large system with Python, but I use it a lot for quick (say up to 1 kLOC) programs because it has a clean, pseudocode-like syntax for expressing algorithms that is terse without being cryptic. It has enough error checking to help me avoid a lot of mistakes, but not so much that it slows down my hacking. It doesn't necessarily have the best regular expression syntax, or the best performance, etc. etc., but it suits me for the scripts I write.
    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  7. Re:I don't really get the Java hate around here by maxume · · Score: 5, Informative

    Are you talking about the section 10 labeled "Python Pre-2.1 did not have lexical scopes."?

    If so, your criticism is bizarre, the example is written to illustrate that "Python Pre-2.1 did not have lexical scopes.", not to illustrate the shortest way to rewrite the built-in sum function (you realize that right, that the idiomatic implementation of sum in python is the built in function?).

    The reason map and reduce aren't cared about is that most people have an easier time with list comprehensions. Your code:

            l = l.strip().split(',')
            l = map(lambda x: int(x.strip(), l)

    can be written as:

            l = [int(x.strip()) for x in l.strip().split(',')]

    in python 2.4 onwards. Obviously, you could put that on as many lines as you wanted. If you are worried about performance, generator expressions are very similar to list expressions but lazily evaluated:

            g = (int(x.strip()) for x in l)

    g would then create items as they are called for by some consumer (for instance, a for loop or a container object).

    --
    Nerd rage is the funniest rage.
  8. Re:I don't really get the Java hate around here by Otter · · Score: 3, Informative
    it is not possible to count python 3000 in amongst those languages with extraordinary power, because the developers - primarily guido - believe that the functional-language-based primitives (map, lambda, reduce, filter) are "unnecessary".

    1) Those capabilities will still exist in the base language, just with different syntax.

    2) If you want the old syntax, it will be available in a standard library.

    Save your hysteria for something genuinely catastrophic, like the loss of the print statement.

  9. Re:Off the top of my head? by Kupek · · Score: 5, Informative

    You've probably never done any coding in Python. Check out the book Dive Into Python (it's free and online): http://www.diveintopython.org/ Even browsing through it will give you a better idea of what Python is good for.

    Personally, I think of Python as a prettier and more coherent version of Perl.

  10. Re:Beards by VGPowerlord · · Score: 4, Informative

    That article is basically a rip of this one by Tamir Khason. Heck, it's essentially a blatant copy of the 2004 version of Tamir's article with some of the 2008 pictures thrown in!

    --
    GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  11. Re:I don't really get the Java hate around here by dk.r*nger · · Score: 4, Informative

    Set the JAVA_HOME environment variable to the path of the JRE you want to use. It's commonly done in a .bat file launching the application.

  12. Re:readability by Just+Some+Guy · · Score: 3, Informative

    BASIC and PASCAL etc. are of the "functional programming" ilke

    BASIC and Pascal are procedural.

    as is SQL

    SQL is declarative.

    LISP, SCHEME and SMALLTALK were all developed when space was at a premium. so, you kept the source file small by using as obtuse-as-possible a syntax.

    That's not why they're that way at all.

    Python's a great language, but that's no reason to get sloppy about the details.

    --
    Dewey, what part of this looks like authorities should be involved?
  13. Re:I don't really get the Java hate around here by leomekenkamp · · Score: 3, Informative

    Today, the most successful programming languages are (...), .NET, (...) (does SQL fit in here?) (...) .NET is not a programming language but a platform. SQL is a query language and not a programming lanugage (Turing machine stuff etc). Java does thread-handling quite decently, it is just too difficult to grasp for most programmers.
    --
    Wenn ist das Nunstueck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput.
  14. Re:Off the top of my head? by RAMMS+EIN · · Score: 3, Informative
    ``I don't think that Ruby is bad, not by a long shot. It's seems fairly
    decent and it doesn't seem to be lacking anything necessary. I'm just
    curious as to why someone would pick Ruby over some other language. I'm
    not quite understanding what the "killer app" of Ruby is. I'm not sure
    why this language had to be created.''

    Ruby was inspired by a number of good and useful programming languages, such as Lisp, Smalltalk, Perl, and Python. It combines the good features of those into a single language. The result is a language that is very powerful, has clean syntax, is easy to get started with, and allows a little code to do a lot of work.

    As for a killer app, I don't think there really is one. Ruby is and has always been a general-purpose language. It got its 15 minutes of fame with Rails, but that has since been cloned in other languages. Nowadays, Ruby is just good at many of the same things Perl is good at, and good at many of the same things Python is good at. I personally prefer Ruby, because it is a very well thought out language and, coming from Lisp, it feels natural to me. Still, I don't think Ruby is that much better that people should or will be switching in droves. It's an incremental improvement over already good and useful languages, not a revolution.

    Now, for some specifics.

    From Perl, Ruby takes first-class regular expressions. Many Ruby modules are also ports of Perl modules.

    From Python, Ruby takes clean syntax. There's quite a lot of competition between Ruby and Python, so I imagine there is a lot of "me too" on both sides.

    From Smalltalk, Ruby takes the object system (everything is an object, every object belongs to a class), and blocks (kind of like anonymous functions, but with special syntax). Blocks, especially, are very powerful, as you can use them to (almost, I have to say as a Lisp programmer) implement your own control structures; loops, iterators, etc.

    From Lisp, or maybe from other languages that have these features, Ruby takes garbage collection, anonymous functions, dynamic typing, call/cc, symbols as first-class values, printing of objects in Ruby-readable form, a read-eval-print loop (enter code, have it evaluated and the results printed) and probably a bunch of other features I am too tired to think of right now (but not macros, alas).

    Ruby also has exceptions, the printf family of functions, and a number of other features commonly found in modern programming languages.

    The kicker is that it has all this in a single, coherent language, with a syntax that is easy to understand and learn, and few great pitfalls. Mostly, whether you already know a programming language or not, you can just start coding in Ruby, and it will be easy. There aren't lots of irritating silly parentheses in Ruby, neither is there a difference between scalar and list context. No buffer overflows, no integer overflows, no memory leaks. You don't need to change the way you think, you don't need an IDE. It's easy to get started with, and yet doesn't suffer from problems that languages that are easy to get started with usually have: bad design, limited expressive power, only really being suitable to one domain, etc.

    Finally, some code, just for kicks:

    # Define an array with first names and one with last names
    first_names = [ 'Alice', 'Bob', 'Charlie', 'Deborah', 'Eve' ]
    last_names = [ 'Cooper', 'Jones', 'Smith' ]

    # Define a class Person
    # Each person has a first name and a last name
    # which have to be passed to the constructor
    # and can be accessed using an accessor
    class Person
    def initialize first_name, last_name
    @first_name = first_name
    @last_name = last_name
    end

    attr_accessor :first_name, :last_name
    end

    # Add a pick method to the class Array
    # The pick method returns an element from the array at random
    class Array
    def pick

    --
    Please correct me if I got my facts wrong.