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?"

51 of 1,119 comments (clear)

  1. Back to Basic by Z00L00K · · Score: 3, Interesting
    Python et.al. are all languages that we who were there in the 80's remember with a combined horror/amusement when we had to write programs in Basic.

    The lack of type-safe variables, the possibility to write unreadable code, hunt for bugs that are caused because two files are incompatible. Interpreting languages has been tried before, and they are never working for large projects that shall live for a long time and has to be maintained by a lot of different programmers.

    Java may be a bastard of Ada, but at least it has some type checks built in. However, it's a bit weak on the side where the user can't control memory management in a good way. Another weakness is that methods can't be declared to allow/disallow the return of 'null' values to be detected at compile-time.

    --
    If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    1. Re:Back to Basic by SatanicPuppy · · Score: 4, Interesting

      I think you've got Python confused with Perl. Python was first released in 1991, and one of its core tenets is a formatting structure that makes it a lot more difficult to write illegible code. So I'm just going to assume you were talking about Perl, and I'm going to assume that you're not as ill-informed as it appears.

      Perl is what it is: A quick and dirty language for generating practical programs. It's ugly, it's hard to maintain, and it makes a lot of peoples lives a lot easier by making operations that are extremely complicated in other languages quite trivial to code. Comparing it to C is not an apples to apples comparison. Comparing it to BASIC is like comparing a Pineapple to a Raisin.

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    2. Re:Back to Basic by SatanicPuppy · · Score: 4, Interesting

      It is strongly typed, however it doesn't use type declarations, so some people make the mistake of assuming because it doesn't ask, it doesn't care.

      Python assumes you know what the hell you're doing, so it won't throw errors if you create two variables, put an Int in each one, and do an Int operation on them, all without declaring a type...It'll figure out the type by context.

      However, if you try to multiply an Int by a String, it'll throw the same type errors any other strongly type language will. They call it "duck typing."

      --
      ad logicam Claiming a proposition is false because it was presented as the conclusion of a fallacious argument.
    3. Re:Back to Basic by chrysalis · · Score: 2, Interesting

      Then you didn't understand that BASIC evolved.

      The GfA-Basic, Omikron Basic and the Fast Basic on Atari were really good, and except OO aspects, those BASICs don't lack anything that Python has.

      Not suitable for large projects?

      There were commercial games written in GfA and Omikron. There were complex utilities. There were demos (self-promotion: check out the Bee Forol Demo by Sector One).

      BASIC=spaghetti code is a cliché. When I dig into some PHP and Python code nowadays, there is still plenty of horrible code that no one but the original author can actually understand. Not that BASIC code was always elegant, but it was just the same thing: anyone could write either elegant code or horrible code, regardless of what the language looks like.

      --
      {{.sig}}
    4. Re:Back to Basic by KillerEggRoll · · Score: 2, Interesting

      The lack of type-safe variables,

      What is your concept of type safety? Declaring types for variables sure as hell doesn't guarantee the validity of the memory contents in languages like C/C++ (defeated all the time with casting!). My guess is that your objection is to dynamic typing - a concept separate from strong typing. Duck typing supports a different philosophy for development - you should program to an interface rather than to a type. It promotes the same benefit of algorithm reuse as you would get from C++ templates and Java generics.

      the possibility to write unreadable code

      The next argument I could conceive is whether it is more beneficial to perform static or runtime analysis. Pushing decisions to runtime allows reflection, language constructs treated as first-class objects, and other features that are WAAAAAYYY more meta than anything you get out of the box from C++ and Java. That means you have concise and elegant syntax for expressing higher order concepts and abstractions. This in turn means that you will generally have highly readable code that has less boilerplate and more problem-solving code.

      the possibility to write unreadable code, hunt for bugs that are caused because two files are incompatible. Interpreting languages has been tried before, and they are never working for large projects that shall live for a long time and has to be maintained by a lot of different programmers.

      I would be interested in case studies on the success, or lack thereof, of dynamic languages in large projects. I certainly have a success story of my own in what I would regard a medium-sized project. I think other factors (performance, programmer skill, etc.) limit the uptake of dynamic languages in areas traditionally dominated by static languages.

  2. SOME Answers: by Jack9 · · Score: 2, Interesting

    The less cryptic the better. This generally means, be C-like in your operators and be easily readable at a loop level.

    Having multiple abstractions available. Multiple ways to do the same complex task efficiently, not just for() or while(). Regex plz.

    Being able to access hardware directly. This includes RAM allocation.

    Few unexpected side effects. Documentation is important for both adoption and maintenance of programs written in the language.

    That's all I got.

    --

    Often wrong but never in doubt.
    I am Jack9.
    Everyone knows me.
  3. Ruby and Python are ex-parrots, not Java by ajv · · Score: 4, Interesting

    I review code for security flaws for a living. I am a pioneer in this field and have literally written the book on it (the OWASP Guide and the OWASP Top 10 2007). I've been doing secure code reviews for the last 10 years.

    I've reviewed 400-500 applications (it's unclear to the total number, but I usually do a review every other week, some shorter, some longer).

    I've never reviewed a Ruby application or been asked to review code written in that language. I have been asked to review a Haskell application.

    I have reviewed:

    * 85-90% Java, usually with shell and ant scripts and occasionally some Perl. Some *years*, this is the only language I am asked to review.
    * 5-10% .NET. I haven't reviewed a .NET application this year.
    * 5% COBOL. Primarily as a side line - there's a lot of old code to review, but most folks never do.

    I've reviewed three PHP applications professionally, all in the last year, even though this is my preferred language to write stuff.

    Java is overwhelmingly used in large commercial settings for high value applications, with .NET a very distant second.

    I don't get to review that many COBOL or other mainframe apps. I've been doing ground breaking research in this area as there's no advice today. There is a false belief that this code is somehow "safe" as it resides on the mainframe. Nothing could be more wrong.

    Ruby and Python, although interesting langauges, has zero commercial penetration, even for worthless brochureware or community apps.

    What they do have is an extremely loud fan base. These languages will not kill COBOL or Java any time in the next forty years or so as the fan base is fickle and will move on to the next big thing when it comes along.

    --
    Andrew van der Stock
    1. Re:Ruby and Python are ex-parrots, not Java by ajv · · Score: 2, Interesting

      Fair point - my list is not a scientific survey and was never intended to be.

      It is skewed towards high value applications - those apps my customers are prepared to pay me to review over a large number of years. There's a significant difference between that set and the total set of applications I *could* review.

      There's plenty types of apps I rarely see, such as open source apps (although I am working on one right now) or scientific apps.

      Some folks in my field specialize in embedded platforms (usually written in assembler, C or Ada). I have reviewed such apps last couple of years, including EFTPOS terminals as used by about 1/4 of Australian businesses (written in C with some concurrent extensions), and power meter readers used by plenty of US utilities (Windows CE based, written in C++). These two reviews are such a tiny minority of my work, they barely rate in my list.

      Although I am able to do code reviews in pretty much any language, I have specialized in high end financial and logistics applications, those that power the world economy. Some of the apps I've reviewed process literally a couple of trillion dollars per day in transactions. These apps are written primarily in Java and COBOL with a smattering of stored procedures (PL/SQL ~= Ada or DB2's stored procedures, generally written in a DB2's SQL dialect).

      If you want a scientific survey, SourceForge used to have a project statistics page detailing what languages are in use. This would be a good metric for open source projects. It would be a terrible metric for closed source / proprietary apps.

      --
      Andrew van der Stock
  4. Re:I don't really get the Java hate around here by Anonymous Coward · · Score: 1, Interesting

    Heh, your story reminds me of how we had to abandon a specific Java application. It would only run on Java 1.4.2_04 (or something) and that version had some buffer overflow bug with image files. (You know that thing that Java is supposed to prevent? Ha!)

    So the network security guys require all computers to be scanned for insecure software. This specific JRE gets tagged as insecure, and the machine gets dropped off the net until we "upgrade" Java.

    Except that upgrading Java causes the application to crash. It will ONLY work with that one specific patch level of Java. (Yes, I tried.)

    Since we were still in the trial phases, we just dropped the application and replaced it with another one that DIDN'T require Java. Problem solved.

    Of course, I doubt the specific security flaw was actually an issue because this was a web service or something that shouldn't do anything with graphics. But arguing that is a losing battle, especially because it did have a Swing-based GUI somewhere.

    So now I'm always wary about using Java applications, since they can easily get tied to a specific JRE and if that JRE has security flaws, you're SOL.

  5. The "scripting" vs "compiled" canard again??? by tyler.willard · · Score: 3, Interesting

    Jesu effing Christo.

    One thing ain't got nothing to do with the other.

    I can't decide which is worse, this particular bit of idiocy or the all-to-common: "dynamic vs strong typing" arguments.

    Actually, maybe I'm being to hasty.

    The conflation of runtime implementation details with language capabilites, or the above-mentioned typing confusion, does provide a quick and easy way to tell that someone doesn't know what the hell they're talking about.

  6. Perhaps a better measurement than /. popularity by klubar · · Score: 5, Interesting

    Don't count out the "dead" languages... IBM estimates that more than 30 billion transactions occur within Cobol programs every day. By contrast, Google averages about 150 million searches each day, or about .5% of Cobol's daily workload.

    Rather than a "gee I need a cool website for my mom" choice, perhaps the number of transactions or dollar value would be a better count.

    Cobol would probably win, followed by java and the Microsoft languages (C++, C#).

  7. Re:Off the top of my head? by OrangeTide · · Score: 4, Interesting

    I'm mainly a C hacker, but I don't get why people would prefer Python over Java. Dynamic typing where you can create new identifiers implicitly is pretty scary to me. I'm not even sure what Python offers over the dozens of other languages that preceded it.

    --
    “Common sense is not so common.” — Voltaire
  8. Here we go again... by Savage-Rabbit · · Score: 1, Interesting

    '13 reasons why Ruby, Python and the gang will push Java to die... of old age' People will continue to postulate that Java is dying just as they have done for years with C/C++ but I'm still willing to bet that in 15 years Java will still be a major player. When a language has achieved the kind of presence in both businesses and the FOSS community world wide that Java and C/C++ have, it is going to be a lot easier to confidently claim that Python & Co. will kill these languages off than it will be to actually do the deed. I'm sure that a number of developers will go over to Python, Ruby & Co. and thus erode the market share of Java but to say that Java will 'die of old' age is stupid. Hell we are still trying to squeeze the life out of COBOL.... with limited success I might add. I know a number of people who get paid good money to write COBOL code.
    --
    Only to idiots, are orders laws.
    -- Henning von Tresckow
  9. Ruby and Python making Java die? Ha! by Cyberax · · Score: 1, Interesting

    Sorry, but this article presumes too much.

    Python and Ruby are not going to push Java away. For one thing, they are SLOW which automatically disqualifies them in a lot of areas (like high-performance computing). Also, Python interpreter is STILL single-threaded.

    Besides, JVM can serve as a platform for many languages. My favorite one is Scala (which is now often deemed as a 'Java killer').

  10. Re:I don't really get the Java hate around here by hesiod · · Score: 3, Interesting

    > Why would you say it's unacceptable?

    I am talking about the client here. Having a minimum JRE version is fine, but did the Java developers remove features from the language and not leave and backwards-compatibility hooks in it? That's the only reason I can see why a Java software package would require a version LOWER than "current."

    If you write a new version of a programming language you created, and old programs do not work AT ALL, then you have done something wrong. Adding features, improving efficiency, etc is fine (great). Removing functionality does not make sense.

  11. Re:I don't really get the Java hate around here by visible.frylock · · Score: 2, Interesting

    Dont get the hate? It's the unnecessary complexity

    Maybe this has gotten better since the time I was trying to get into Java (~3-4 years ago). But, for better or worse, first impressions are really important. And this kind of code is exactly what I think of when I think Java. I have some really bad memories related to Java (Swing, AWT, type conversion exceptions, Gui layouts (looking at you gridbox)). Some will leave and never come back. Some will try to come back and see if things have improved. Of those, some will return and some won't find anything to persuade them to change. Related to the topic at hand, the life cycle of a language and how it's managed can have a huge impact on the size, scope, and makeup of its userbase.

    Oh, and I tried to blockquote that code here but the lameness filter stopped it ;)

    --
    Billy Brown rides on. Yolanda Green bypasses Gary White.
  12. Its partly the API... by itsdapead · · Score: 3, Interesting

    Obviously there's more than one factor to a language's success, but the breadth and quality of the libraries and application frameworks is a huge factor - if you "know a bit" about programming then I'd say that learning your way around a new API is just as much work as learning a new language.

    A big plus for C was that it always came with a substantial standard ("de-facto" to start with, then ISO) library based on the Unix API so it was great for writing portable programs - c.f. Pascal where ISTR the core language couldn't even open a named file. C++ was largely popularized by application frameworks like MFC and OWL, and Delphi did the same for Pascal.

    PHP is pretty fugly as a language but comes with a huge library of functions and add-ons that are just what the doctor ordered for web scripting - and when people talk about Ruby, do they really mean Ruby or do they mean Rails?

    I don't know about Python - it seems to be a secret society rather than a language and you can't join unless you pass this initiation test where someone tells you a corny joke (stolen from an ancient email circular about Unix and Makefiles) about a language which uses leading whitespace to delineate blocks. I always laugh and fail the test, so I've no idea what the real language is like. :-)

    --
    In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
  13. Re:... Evolution... by netsavior · · Score: 2, Interesting

    Although oddly enough the languages for which I speak are things like C#


    Have you seen the new 3.0 libraries?? MS Application blocks look a lot like J2EE when it first came out + the best of Jakarta that we have all been using for almost a decade. Don't get me wrong C# does a lot of "good" stuff... but a lot of its most "innovative" stuff is just finally bringing it up to snuff with the way we have all been using J2EE since the dot com bust.
  14. Re:I don't really get the Java hate around here by hardburn · · Score: 2, Interesting

    Does java.io still make you jump through 15 different object declarations just to read a file line-by-line? It's bad huffman coding built into the class design like the above that made me get away from Java.

    --
    Not a typewriter
  15. Re:I don't really get the Java hate around here by Em+Ellel · · Score: 4, Interesting

    So now I'm always wary about using Java applications, since they can easily get tied to a specific JRE and if that JRE has security flaws, you're SOL. Same can be said of ANY language that evolves. I am currently battling an app parts of which require Python 2.3, parts 2.4 and parts 2.5.

    The bottom line is that no language will ever make the programmer smart. If the programmer is dumb enough to use some esoteric/ undocumented/ unsupported part of the JVM (Sun has a number of those, but no, it is NOT easy to get stuck on a specific JVM rev unknowingly) - thats the programmer's fault. If the app is supported (or at least open sourced) fixing this sort of a dependency on a particular version should be quick and easy. If you do not have code and the app is not supported, then you really shouldn't be running it in the first place! Sounds like the app was abandoned long before you realized it.

    -Em

    --
    RelevantElephants: A Somatic WebComic...
  16. Irony by w3woody · · Score: 4, Interesting

    Ironically the biggest problem I've had with Java is that, because it is relatively easy for developers to write code using an IDE such as Eclipse or NetBeans in the core language itself, but there are tons of various classes even within the core JRE, many programmers I know who write Java have created a sort of "ecosystem" of artificial complexity.

    For example, I worked on one project which was a client/server system which handled maybe 10 transactions per second, with each transaction translating into maybe one or two table updates. The application could have been put together using something simple, like Tomcat and MySQL on the back-end, and something easy to use like an XML/RPC link to the client side. (There were only something like 10 remote procedure calls being made, and this was an internal application, which means the total audience was perhaps 100 people.)

    But rather than keep the whole thing simple, we had a whole bunch of "Architecture Astronaut" wannabes who started tossing in third party frameworks like there was no yesterday, without carefully thinking if the framework was needed, and if so, how best to integrate the framework. Before we knew it, the server was broken into 8 separate EJBs, Hibernate and Spring were called in to handle the server side coding framework, and the entire build process was so complicated it no longer could be run or debugged within an IDE--apparently someone on the project didn't understand ant and used makefiles for part of the build. And to top it off, because so many different frameworks were thrown in for no good reason I can determine (there were something like 40 third-party jar files in the build directory), there were all sorts of runtime problems as each jar file was not designed or tested on the full range of Java 1.4 - 6.0 environments.

    Now if this was my first exposure to Java, I'd say that while the core language itself wasn't bad, the entire Java ecosystem sucked hard core. But no; it was the developers: rather than keep it simple, they used the 'refactor' button in NetBeans about 100 times too many, until what should have been a one person-three month job turned into half a million lines of crap, that, to their credit, limped along okay.

    1. Re:Irony by Anonymous Coward · · Score: 1, Interesting

      > the server was broken into 8 separate EJBs, Hibernate and Spring were called in to handle the server side

      And some kid comes along and replaces it all with simple and easy understand PHP in three weeks. I made a good living for about four years replacing bloated Java systems that had failed with a triaged (toss features that weren't necessary) version in PHP for a fraction of the man hours. I got pretty good at replacing systems at less than 1% of the original man-hours. With the four programmers I had we successfully replaced nine relatively large systems written in Java at an average of 1/100 the time spent on the failed system.

      > the entire build process was so complicated it no longer could be run or debugged within an IDE

      Funny you should mention build problems, I sold my part of the PHP business due to a dispute with my partner, and I am now working as a contractor to help fix problems with failing C#/.NET web-based systems. I'm seeing even small companies that can't even compile their software in Visual Studio. Even msbuild at the command line is failing more often than not for some of the larger projects. Projects that should take two minutes (going by how long the number of lines would take to compile in Java) sometimes take four hours or more to compile with .NET. At the moment I'm trying to fix a .NET system with 31k files that takes more than two hours to compile when it does compile. A large number of references and libraries absolutely screws-up the crappy Microsoft toolset. Java was bad in this regard, but C#/.NET is quickly becoming a much, much bigger nightmare because the number of libraries and the poor tools. I forsee this next career being very lucrative. You will never go broke either fixing Microsoft's problems or fixing systems that developers overcomplicate. I'm doing both.

  17. Re:grmbl. by pdq332 · · Score: 3, Interesting

    I'm not sure if that was meant as a joke, but I happen to agree with you for the following reason: a programming language is successful when it opens up the field to low to mid grade programmers. These may be people who are professionals in other areas and are just dabbling with a specific task, incurious people who are just trying to make a living, or newbies. If the programming language has constructs and tools available that support these people, then the cost of producing programs goes down and the language becomes more widely adopted by industry. On the other hand, while quality, fully functional and maintainable programs will still be written by experts, experts can bend any Turing complete language with appropriate I/O libraries to their will. (As well, experts can turn any simple system into an overdefined complicated mess.) The one thing which seems to make no difference to the success of a programming language (but I really really really wish it did) is the ease of deployment, versioning, packaging and runtime configuration. It's time consuming on the order of requirements gathering to successfully plan and execute deployment for anything other than a statically linked executable.

  18. Re:... Evolution... by nuzak · · Score: 2, Interesting

    Java has generics. Unfortunately they're erased, so they're basically nothing but syntax sugar for runtime casts when you want to use generics from another jar. To add further insult, the compiler yells at you whenever you dare to accomplish such feats of reuse, so most of us have to pepper our code with annotations to shut up the stupid warning about erasure.

    Java is now adding "closures", which may or may not actually act as static closures, but may just be syntax sugar for anonymous functions instead. We may see them next year if we're really lucky. Meanwhile C# has LINQ, which is statically typed throughout. C# has a BDFL in Anders Helsburg, Java has a committee that puts Ada's to shame.

    --
    Done with slashdot, done with nerds, getting a life.
  19. Re:I don't really get the Java hate around here by lkcl · · Score: 5, Interesting

    see http://norvig.com/python-lisp.html section 10

    the author looks like he is inexperienced, and unaware of the function "reduce", which was added initially as a patch to python 1.5 by an experienced lisp programmer (along with map, lambda and filter) and so his example in section 10 could be replaced with:

    from operator import add
    reduce(add, [1,2,3])

    but the point of mentioning this is that java is extremely verbose - and consequently cumbersome.

    there is a class of programming language which python 2.x, lisp, smalltalk and other extreme-OO languages fall in to, which have an incredible elegance of expression and a level of empowerment that is wayyyy beyond anything else.

    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".

    i initially thought that this was a joke - it was announced on april 1st.

    unfortunately it turns out to be true. the removal of these key features is profound: the language (python 3000) is dead before it is completed. it's difficult to explain but these functional-language primitives are extraordinarily powerful, providing a kind of "zeroth dimension" of data manipulation.

    on a single line, you can do incredible data manipulation. i regularly do things like this:

    from string import strip
    for l in open("file.csv").readlines():
          l = l.strip() # take off newline especially
          l = l.split(',') # split by comma
          l = map(strip, l) # strip white space
          l = map(int, l) # convert everything to ints

    of course you could fit that all on one line but i deliberately kept it to 4 lines in order to include the comments. you could also equally do this:

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

    the flexibility is just... amazing, in python.

    the other thing about python is that it tends to be self-documenting, and also, there appears to be a tendency of coders to actually write _some_ documentation.

    that, and the fact that it is possible to walk the source code (or, more usually, the object-code) and 'read' it from inside a program, such that you can access the documentation strings and in fact the entire program...

    so things like happydoc can auto-generate you HTML documentation, by walking the code itself and collecting all the module, class and function documentation strings - just .... just... incredible!

    i regularly do things like this:

    import os
    print os.path.__doc__

    i don't bother to look up online how the function os.path works, i print its documentation string!

    you just don't get these kinds of things with java.

  20. readability by lkcl · · Score: 1, Interesting

    BASIC and PASCAL etc. are of the "functional programming" ilke (as is SQL, but that's another story - look up "the vietnam of computer science" if you're interested and also http://advogato.org/article/964.html ).

    python falls into the same category as LISP, scheme and smalltalk: incredibly incredibly powerful.

    it is very difficult to write unreadable code in python, for two key reasons:

    1) the indentation method

    same number of tabs (or spaces) indicates a block - FORCES programmers to make their code "tidy". many programming languages are absolutely xxxxing awful and impossible to read due to inadequate use of white space.

    2) compactness and elegance.

    key to python's readability is the lack of messing about and the use of english words. 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.

    by the 90s, this was completely unnecessary, and so languages like python are not only highly readable, but also due to having similar OO capabilities as the other elegant languages (lisp, scheme, smalltalk) you can do more with less code.

    result: less code on-screen, therefore you don't end up wading through pages and pages of code.

    overall... there's just really... no comparison to any other programming language.

    _especially_ java.

  21. what is good by goffster · · Score: 1, Interesting

    A good programming language allows you to
    solve your programming
    problem with a minimum of effort.

    Solving your problem means a lot if different things.

    In my opinion, software that forms the foundation of other software should be strongly typed. Maintenance becomes a nightmare without such typing.

    For end-programmer applications, I would think that anything that allows you to be done as quickly as possible is best.

  22. Not a developer, but a user by $criptah · · Score: 1, Interesting

    I am not a developer. I don't know all the insides of Java, C#, C++, Python or Ruby. Yet, I have to use these languages and other tools on a daily basis to make a living as somebody who works in the field of integration and system engineering. Programming languages for me are just like tools. I would like to use something that is easy to learn and that gets a job done. That's why I hate C++ and that is why I see Python and Ruby pushing Java out at least in many areas where performance and ability to multi-thread are not the top priorities.

    Please spare me the inner details of every language and pros and cos and what is pure object oriented and what is not. I get paid to accomplish things and not to debate about the purity of a programming language. In the environment where you have to make two applications and throw one away, Python really shines. It is a great language for prototypes. It is easy to learn, relatively fast for what I need to do and it can be hooked up with Java or C++ without too many issues. The way I think about it, a language is like a tool. Many years ago everything had to be done by hand and then we developed power tools. I know some purists who love to build furniture and other objects using old school approach (no nails, just glue and hand work). Good for them. I like to use the latest tools that are proven to make my work easier. I don't doubt that Java will be alive and well many years from now, but it is very refreshing to have other high-level alternatives.

  23. Re:Quck! by shutdown+-p+now · · Score: 1, Interesting

    Very, very unlikely. If you're using Windows, you'll see plenty of .NET software these days (IIRC, control panels for both NVidia and ATI drivers are .NET-based, for example), still quite a few Delphi applications (and used to be a lot more only a few years ago), and an occasional VB6 monstrosity. If you run a GNOME-based Linux distro, it's very likely that quite a few of Gtk+ applications you use are written in PyGtk. I would imagine it's mostly C++ in the KDE land, though - Qt really doesn't map well on anything else, unfortunately.

  24. Another related case by richg74 · · Score: 4, Interesting
    One of the author's suggestions in TFA is that functional languages have a hard time succeeding because of their concise, "math-y" syntax. Speaking as someone who has been in software development since the System/360 days, and also a sometime math teacher, I think he's absolutely right. Expressing things in mathematical terms is powerful, elegant, and concise; what is isn't is intuitive, at least for the majority of people.

    Consider a much earlier example of a math-like language: APL. It allowed concise programs and elegant expression (especially of mathematical ideas, like matrices); it ran in the then-mainstream environment (IBM mainframes); and, it was sponsored by the industry's 800-pound gorilla. And it was the best language for creating write-only programs that I have ever encountered -- think Perl with an extra helping of math and a non-standard character set thrown in. The worst programming assignment I ever had (although I did complete it successfully) was debugging and fixing a financial modeling package written in APL. My take on it was that the programmers who had written it originally fell mainly into two categories:

    • Those who were confused by the syntax and concepts
    • Those who used the syntax in a contest to see who could be "cutest"
    Neither is really what you want going on in an important enterprise-level project.
  25. Smalltak is a huge success and also a failure by Grapedrink · · Score: 5, Interesting

    It's hard not to turn this discussion into a war and I do believe that even from a qualitative perspective, this discussion is entirely subjective. Let me preface my comments by saying I work primarily in C#, Java, Ruby, and Python in my job, and previously was a C, C++, Fortran, and Assembly programmer. I know about a dozen more languages as well, so I feel I've at least had exposure to many languages to guage success from a developer's point of view. Generally, I think being good at a certain job/task makes a language successful. There is a corollary that one should pick the best tool for the job, not because it's the "best" language. C++ is successful because it was very fast at the time, had a lot of features people wanted, and was relatively easy to learn. Would I do a web page in C++ these days? Probably not.

    If I had to pick a language to discuss and deem successful, it would be either Smalltalk or Lisp. Some people find either of those esoteric or "weird," but I rather enjoy writing code in both. Interestingly enough, in many respects neither language is particular successful in a commercial sense, but very much so for most implementations.

    I'll stick to Smalltalk because it's a good example for this discussion. It's a case where popularity in my mind is not equal to success. Smalltalk works because it is simple (there are really only 6 keywords or so and not even really keywords at that) and is designed impeccably. If success is related to imitation and admiration, then Smalltalk is up there. Of course in itself, the language is derivative, but it's well-known enough to claim/steal credit for one of the best implementations of existing ideas. I have to laugh at other languages, especially Ruby, Python, C#, and Java as they are adding language features or libraries that emulate things that have existed in Smalltalk for 20+ years. That's rather laughable, but also an indicator of success.

    As the Smalltalk saying goes, "Files? How quaint." The language just proves you can design something successful by simplifying and focusing on enabling people to design and use their brains. I feel like I can focus on code rather than language constraints. Smalltalk coding is like teaching them to farm rather than giving them food. There are obvious merits to both approaches. The fact that the language is still around 20+ years later and gaining momentum speaks volumes.

    I think what makes it unsuccessful is that a lot of people have no idea it exists in the first place and how it really works. They might look at it and say, "yeah that looks something like Ruby, so what's the point." Usually I find it's lack of understanding of not only Smalltalk, but the fact that the development environment in many ways is the language. Most Smalltalk implementations simply don't have the problems in file-based languages like disorganized code, "too many classes," etc. So many of the plights in other languages don't happen in Smalltalk because of the design and that to me is success, regardless of the number of commercial installations.

    Another issues that has halted the language's success in commercial spaces has been ugly UI. Until recently, most implementations have looked awful. Squeak used to look like a child's toy without customizations (still does to some degree, but there's 100s of customized images floating around the internet now). Visual Works looks like an ugly ms-app sometimes, but is a huge leap over the past. Gemstone Smalltalk has no real UI (but can use Squeak). The list goes on, but the point is that even in dev environments, eye candy has a big influence.

    It gets even weirder when you look at Smalltalk and languages from the perspective of supporting products. Databases are probably the biggest, and Smalltalk can work with just about everything, but the simple support for the RDBMS is pitiful compared to most popular languages. Especially in recent years, a lot of that has to do with the Smalltalk view. In the Smalltalk world, it seems stupid not to use an object database at this poin

  26. Re:What makes a programming language successful? by bsDaemon · · Score: 2, Interesting

    yes, but magic incantations in C are more likely to produce real-world results. The TechnoGods help those who help themselves, after all.

  27. Re:Aging Engineers by UnderCoverPenguin · · Score: 3, Interesting

    The reality was, that the kids just wanted to pretend they were doing OOP. They still used straight C, they just created structs and organized functions in files as if they were classes.

    You don't need an object oriented language to do object oriented programming, just the will and discipline to do it.

    FYI, FWIW, the original implementation of C++ was as a preprocessor to C.

    OO languages certainly make it easier to do OOP, however, in my experience, the compiled executable is usually much larger than if you "hand code" OOP in a non-OO langage. Of course, in my experience, even hand coded OOP results in larger executables than non-OOP coding.

    --
    Don't try to out wierd me, three-eyes. I get stranger things than you, free with my breakfast cereal. --Zaphod Beeblebr
  28. Re:Off the top of my head? by OrangeTide · · Score: 4, Interesting

    Well I think Java's object model is superior. Perhaps it's only a matter of taste rather than cold hard logic.

    --
    “Common sense is not so common.” — Voltaire
  29. Re:Off the top of my head? by rawler · · Score: 2, Interesting

    When someone ask me, I'd say Java has more or less managed to hit exactly the sour-spot between a quick, agile and productive language such as Python, and a performant and lightwheight language such as C/C++.

    If any language manages to find a good compromise in between, though, I would say it's D. I find the Design-By-Contract features to be brilliant, it's flexibility and power is close to Ruby/Python (and combines some of the best aspects of both), while performance and memory-use is fairly close to C++ (and waay better than Java).

  30. Language vs class of work by mlwmohawk · · Score: 2, Interesting

    Another set of reasons why some languages survive and some don't may be the types of applications they can be used for.

    The C and C++ tool set is *never* going away. You can't, in any practical sense, write an OS in java. C and C++ are *the* standard for writing system level software. Most all system software is written in one of them and they are tightly coupled. There is no other language currently or on the realistic horizon that can replace their functionality.

    Java, on the other hand, is popular, but has plenty of practical competition, from C#, to perl, to even PHP. Hell, even visual basic has a VM environment.

    As a system level guy, I have little use for Java, C#, perl, or the others except as needed for glue between system level code.

  31. Re:Off the top of my head? by OrangeTide · · Score: 2, Interesting

    Bloat compared to Lua or C. and 40M on Linux. Although JVM+classes(about 75M) aren't all that large either until you install J2EE.

    qmail comes with the utility, written in C, do convert mbox to maildir. You wasted your effort for not using google hard enough.

    I've heard stories identical to yours from Perl users. I just don't see the hype when people have been doing the same thing in other languages for years.

    --
    “Common sense is not so common.” — Voltaire
  32. Re:Off the top of my head? by naasking · · Score: 5, Interesting

    Killer apps are overrated. Ruby is an expressive language, period. Studies have shown that software developers can only write a few lines of correct code per day. Making those lines count for as much as possible is important from a correctness, and a maintainability perspective.

    Furthermore, application complexity increases non-linearly with lines of code. The fewer the lines of code, the more maintainable and understandable the program.

    This is one reason why C is a poor choice of application language, because it requires verbose solutions, and why OCaml is a better choice.

    So the winning factor of Ruby over Java is its expressiveness. The big downside is the loss of static typing, and the subsequent loss of certain pre-runtime guarantees. If we could have both, we'd have a real killer language.

  33. Re:Off the top of my head? by Anonymous Coward · · Score: 1, Interesting
    The community is fucking retarded.

    Thank you.

    I know all the little ruby people will take offense, much like all the little perl people did 10 years ago whenever you said something negative about a regular expression (the ones that knew "regex" was shorthand for "regular expression".) Java was sort of the first language to launch with marketing, it was a language that was marketed, had some thought leaders, they quickly put together some conferences and stuff, did everything to "make it popular." Ruby is trying to do the same thing but the community is a bunch of misfits and insecure little twats.

    Not just do they want to be different, there is peer pressure that they attempt to apply to get others in their tribe to feel insecure about not being different.

    The language is nice, but every damn time the big differentiating factor is a closure and iterating through a set. How about something like reversing the bytes in a file or calculating prime numbers or something.

    The other thing to me, is there are companies trying to do all ruby solutions, like Twitter or Penny arcade, and without exception they need to invoke other solutions. What's the allure when you have to write C code anyways? At least in Java there is a chance that there is a pure java solution that will perform, it seems exceedingly rare for people to write much C to speed up Java applications anymore. With Ruby, Python, PHP, it's the norm. I guess that's technically a language implementation problem rather than a language problem but the lack of good implementations is of concern.

  34. Re:I don't really get the Java hate around here by hesiod · · Score: 2, Interesting

    > That was mostly a joke.... mostly ;-)

    Sorry, I fractured my funny bone after my first post today required me to repeatedly rush to clarify every letter I wrote. :)

    > Beat them up to explain what it does.

    I'm pretty sure it is just a pretty face EXE that runs different EXEs that run javaw with the jar files as arguments... Yes, I know this sounds wrong. No, they are not that great at what they do. We are probably their worst customer from their POV, because I have a tendency to ask a lot of questions like "what in the world possessed you to do that?" and pointing out when something they did was a Very Bad Idea(tm)... which is uncomfortably common.

    > Chances are it will respect the env variables you pass into it.

    Given their history I doubt it, but it doesn't cost me anything but frustration to ask (our support contract is up to date). :)

    > is the app a WAR/EAR file for a web app or is it an applet?

    Sorry, I have no idea how to determine WAR/EAR. I had to look them up just to know what the acronyms meant. There are multiple programs involved here. The one I am referring to in this post, mostly, is a collection of JAR files that are installed locally, and are standalone applications. There is one launch EXE, and for each program it launches, there is another EXE in the same folder as a JAR.

    For other apps, I just know that we open up a web page and it wants java to be there. How it reacts depends on the program. The most important one of these web apps attempts to install JRE 1.4 if it doesn't already exist (even if 1.3 does exist).

  35. This is rediculous by sentientbrendan · · Score: 2, Interesting

    A lot of noise comes up about these various flash in the pan languages periodicallly, but if you look at a chart of language uses, even python that has been around for 10 years or more has only a few percentage points marketshare.

    Meanwhile, Java is the most widely used programming language ever, at around 20%.

    http://radar.oreilly.com/archives/2006/08/programming-language-trends.html

    Whereas C and C++ hover around the 10 or 20% range.

    I use python for some small utilities, and in fact I do expect python's usage to increase over time. However, expecting java or c++ to die, is like expecting English and French to die, and some Esperanto to take over.

    It doesn't even *matter* that much if there's some language out there that's so much better than C++ or Java (which is debatable, but functional programming fanatics will scream so loudly about it so I'm not going to bother to argue the point), but that fact that such a vast volume of existing code is written in c++ and java, and there are so many tools and libraries written to support c++ and java development, makes it a *huge mistake* to start some kinds of large software development projects in some other languages, where all of these things will need to be written from scratch at enormous expense.

    Projects written in non mainstream languages tend to either fall into a specific program domain the language was designed for, or tend to be very small scale, and usually both. There are very few good *general purpose* langauges that scale up and have good library and tool support. Read: There are *two* of them.... well, three if you consider c#, which I don't, because it is proprietary.

  36. Re:All Programming Languages Suck by cjonslashdot · · Score: 3, Interesting

    I agree. Procedural programming is the fundamental problem. Arguing about which procedural language will succeed is like Neanderthals arguing which kind of stone will succeed the one before it. And OO languages are procedural languages in disguise. As Anonymous Coward says, we need to get out of the procedural trap. This is why programs have so many bugs. Let's stop hacking and looking for the next great tool, the next fad, and what our friends are using. Let's look at what approach is truly best.

  37. Re:Aging Engineers by ardor · · Score: 2, Interesting

    I thought it gave developers too much rope when it first came out and the rope has only gotten longer. More powerful languages require more studies. The inherent difficulty always increases with increased ability. But there is a lot of accidental difficulty in C++, thats right. Let me emphasize one thing here: I don't think C++ is the pinnacle of programming. Far from it. But its undeniably powerful, and there is no other language that has this amount of expressiveness and range. Java and C# are severely limited in comparison. Python and Lisp are much more flexible, but at the cost of performance. Where else can I write metaprograms that construct a code path at compile-time, for example? With all the compile-time optimizations applied to the result?

    I also gave examples already. Try replicating Boost.Fusion or Boost.Proto in C# or Java. Try replicating Blitz++, or Spirit. Try generic programming in C++, then in Java and C# (you'll curse at the latter two's generics). Look up what's possible with C++ metaprograms (-> Boost.MPL & Fusion). Read books from Scott Meyers and Alexei Alexandrescu (especially Modern C++ Design).

    If you want to compare LOC, compare an email client written in Java versus one written in C++ --or-- compare an html push app written in Perl versus one written in C++. C++ won't even come close, because, that's not what it was designed for. But using metaprogramming you can write enough tools to come close in C++. You seem to be trapped in arpa/inet.h or land - try writing a HTTP server or an email client in C++ using boost (especially boost.asio), THEN compare the LOC. (In fact, there is a HTTP server example supplied with asio.)

    Lets make the comparison fair - write an email client WITHOUT the Java Standard Library. Just a thin wrapper over the socket API and the system, one that equals the C++ stdlib. I even go as far as saying that with asio, boost, and tr1, I could beat Java's LOC WITH its standard library. (Generally, when a problem demands high language expressiveness, Java's LOC count goes through the roof.)

    A lot of the arguments against C++ originate from obsolete C++ code and practices. This is 2008, folks. MFC-style C++ has less than 1% in common with modern C++.
    --
    This sig does not contain any SCO code.
  38. Often overlooked in Java by ttfkam · · Score: 2, Interesting

    I love dynamic languages as much as the next guy, but there is one major item that I think make Java shine: explicit typing in the interfaces. No seriously, hear me out.

    One of the great things about languages like Python is that you can shove just about anything anywhere provided the method signatures and properties match what's being executed. But what about when you didn't write the code? Plone (for example) has gotten much better, but when developing for it, it was often a PITA to find out what features were available from the return value of a given function or what features you should be putting into an object. Yes, I know, the documentation for that CMS has improved greatly in the last couple of years, but I got burned a few years back. And I blame the language.

    With Java and interfaces, the objects and values passed to and fro are all documented by design. Javadoc, as often as people like to malign it, is so much better than nothing at all and worlds better than competing code documentation generators for languages like Python, Ruby, or Perl.

    "Just look at the Python object definition," you say? The problem is that coders tend to mutate the object during runtime, adding *public* properties and methods on those objects. In addition, there are often methods and properties that are completely useless to the given job at hand. Are they needed in a given instance? You cannot know by looking at the object definition. You need a published interface for that, and that's what Java's interfaces do.

    At less than five thousand lines of code, any language would work except maybe for Brainfuck, but that's a whole other can of worms. Once your codebase grows and, more importantly, gets more people involved in its development, documentation becomes all the more important. No, Javadoc isn't the "end all, be all" solution for project documentation by a long shot, but a hell of a lot better than nothing, and without explicit interface definitions, no automated documentation engine will help one bit with real problems.

    --

    - I don't need to go outside, my CRT tan'll do me just fine.
  39. Decrease in IT spending by koehn · · Score: 2, Interesting

    One of the reasons that Java became so popular was that it was new during a time that business was making enormous investments in IT. That time has passed, and business is less likely to invest in new languages, tools, etc, regardless of their merits.

  40. Re:I don't really get the Java hate around here by chromatic · · Score: 2, Interesting

    You'll note that despite those two great features, Perl continues to lose popularity, mostly to Python.

    Popularity of what? I've seen various statistics, and the job trends and book sales figures (for two examples) disagree with this assessment.

  41. Python == Basic !?!? by weston · · Score: 2, Interesting

    Python et.al. are all languages that we who were there in the 80's remember with a combined horror/amusement when we had to write programs in Basic.

    You have got to be kidding me.

    This is a mistake on the order of "Cats are mortal. Aristotle is mortal. Therefore, Aristotle is a cat."

    I'm not a particularly big user of Python, but I know enough to know the comparison with Basic is pretty shallow. There's an interpreter, and there's divergence from C syntax. I think that's about it. And there's all kinds of stuff in Python, Perl, Ruby, and even *PHP* that you could never dream of doing in any Basic I saw during the 1980s.

    The lack of type-safe variables,

    Type safety. Okay. You're one of those people. You're hereby sentenced to read all of Steve Yegge's blog posts for a year.

    Alternatively, you're welcome to cite studies indicating higher productivity for type safe languages.

    the possibility to write unreadable code

    Which language have you found it impossible to write unreadable code in?

    hunt for bugs that are caused because two files are incompatible.

    Right. Like there exists a language that addresses this problem.

    Interpreting languages has been tried before,and they are never working for large projects that shall live for a long time and has to be maintained by a lot of different programmers.

    "Implementations with feature X have failed, therefore any implementation with feature X will fail." That sword can be wielded equally well against compiled "type safe" languages.

    The fact that a language has an interpreter that implements it really doesn't have much to do with whether or not it can be compiled. Python can be compiled to Java class files, for instance, and probably a few other targets I don't know about. So can Javascript. Probably Ruby, too.

    And as for large, sustainable projects You're posting on a system that's over 10 years old that's built in Perl. You've probably bought books or something else from a bigger site that uses it too. I've worked on a system that predates Slashdot that had a codebase that was 10% Perl and it's still going strong. This is to say nothing of highly visible examples of development in PHP of all things.

    I have nothing against compiling when the situation demands it, and I can respect the fact that automatic tools for catching certain kinds of mistakes are helpful. That's not really a function of type safety, however. Ask Perl or PHP (and probably the others) to warn you if you've misspelled a variable or done other "bad" things with it, and they will, for example. But moreover, it's been a long time since most of the mistakes in my programming had anything to do with whether or not I fed the right variable the right type of primitive or reference, and I suspect the same is true of most experienced programmers.

  42. Things that make a language "Good" by bill_kress · · Score: 2, Interesting


    Depends I suppose. There are multiple worlds at play here. In one corner, there are the new kids just coming into programming, those on small teams, web developers, thrill seekers. They are looking for languages that offer minimal keystrokes, neat features, quick prototyping (rails!), minimal configuration, etc.

    For these people, maintainability isn't really even a remote consideration. For them the critical measurement seems to be the ratio of:

      (functionality * fun cleaver features) / (keystrokes * prototype dev time)

    They often get bogged down in their own code after the first few releases, but the people who started the project and chose the language are often off to another by this time, and if not they rarely even recognize the additional time spent to repair something later. (and to tell you the truth, if you used prototype development speed to sell the project and delivered the initial prototype and the customer bought it, there is a valid argument that they did the right thing even if it moved time and problems to later in the project cycle)

    Another very large (and very quiet) group is more interested in a formula like this:

        (Maintainability * Stability * Consistency * Comprehensibility) / (cleaver features ^ 2)

    Note that there is absolutely no concern for how much you type here. Typing speed has no relationship whatsoever for how long it takes a large project to come out--it's an inverse relationship in fact. Having to learn something new just to save a few keystrokes is a huge negative (multiply learning time by the 500 people on your team, it becomes like a manyear per feature easily)

    This group is huge--it's virtually every team I've worked with, and, of the ones I've known, maybe 2% twitter, blog, read blogs or listen to podcasts. They are not involved in the community, they just work and go home to their families. They are typically comfortable with Unix and A few read /. (the exception that makes the rule)

    They are generally developing in pre java-6, and often pre java-5. Sometimes because they have to, but often because of stability and huge retesting requirements to ceritfy a new development tool.

    In my realm they are almost always Java or C++, although the latter is getting more rare. I'm sure in windows they are almost all using C#.

    They usually aren't interested in learning about other languages or complicating the one they are using (although they will use the features if available).

    This group ranges from uncreative programmers who struggle with concepts like OO or Generics or (in some cases) pointers and boolean math to are excellent all-around programmers; and many used to be in the first group.

    Most are just good programmers that want to go home at 5:00 and spend the night with their families instead of jumping straight on the computer to learn a new technology.

    Personally I think this latter group is quiet enough that the industry writers, bloggers and podcasters don't realize they exist, but I'd guess that they are at least 70% of the programmers out there.

    If it wasn't for Java and C#, they would probably be using ADA or C++. Ruby and Python would never be considered.

  43. Re:Off the top of my head? by abdulla · · Score: 4, Interesting

    People often go on about the "compiler generated overhead" in C++, which always made me believe that function pointers would be just as fast or faster than virtual functions. So I went along with this belief and passed function pointers around instead of just having a virtual function in a base class - I'm talking about one particular situation here where I had the choice of the 2 and I wanted maximum performance, this isn't something I blindly do all the time, virtual functions are infinitely useful and function pointers are a pain in the ass. However one day I thought I'd benchmark the 2 for the hell of it and challenge my assumptions. Turns out, at least with GCC 4 under Linux, virtual methods are significantly faster, especially when optimisations are turned on. So sometimes it's not compiler generated overhead, but rather compiler enabled optimisation due to better object model integration. If you want objects, use C++ - C with GLib is a horrible, horrible hack.

  44. Re:Off the top of my head? by fyngyrz · · Score: 2, Interesting

    Most of the overhead I've observed has been in much larger executables. Not speed; compilers tend to be awesome at unrolling loops and all manner of other trickery that you wouldn't generally do by hand (because it'd be insanely ugly and hard to understand.)

    On your other point, though, I find using functions inside structures (essentially objects) as methods to be so simple as to be absolutely painless. I wonder what you're running into with your virtual functions.

    Definition:
    struct foo
    {
    long l_foo;
    float f_foo;
    int (*function_foo)(struct *foo,int a,float b);
    };

    Use:
    struct foo myfoo;

    init_foo(&myfoo); // initialize foo, set function pointer, variables, etc ...
    (*myfoo.function_foo)(&myfoo,1,2.0f); // use method

    --
    I've fallen off your lawn, and I can't get up.