Slashdot Mirror


Why We Need More Programming Languages

snydeq writes "Fatal Exception's Neil McAllister writes in favor of new programming languages, given the difficulty of upgrading existing, popular languages. 'Whenever a new programming language is announced, a certain segment of the developer population always rolls its eyes and groans that we have quite enough to choose from already,' McAllister writes. 'But once a language reaches a certain tipping point of popularity, overhauling it to include support for new features, paradigms, and patterns is easier said than done.' PHP 6, Perl 6, Python 3, ECMAScript 4 — 'the lesson from all of these examples is clear: Programming languages move slowly, and the more popular a language is, the slower it moves. It is far, far easier to create a new language from whole cloth than it is to convince the existing user base of a popular language to accept radical changes.'"

21 of 421 comments (clear)

  1. Pffft. by epiphani · · Score: 5, Funny

    Only language we ever needed was C. You putzes just aren't using it right.
     
    /flamebait friday!

    --
    .
    1. Re:Pffft. by 2.7182 · · Score: 4, Funny

      I'll chime in with the correct answer. If we all programmed in Haskell or OCaml the world would be a better place. Lisp even.

      But I won't go on with a full rant. Functional programming is silently winning the war.

    2. Re:Pffft. by wed128 · · Score: 4, Insightful

      GP has got it right. Parent is demonstrably wrong.

      For object oriented tasks, Java, C# or Smalltalk are better. For system-level native tasks, C is better.

      C++ reminds me of the wretched alien-human hybrid that got the Flamethrower in the Alien movie.

    3. Re:Pffft. by Xanny · · Score: 5, Interesting

      There are a few problems with functional programming languages that have prevented their true adoption anywhere.

      1. Limited paradigms - I always prefer languages that let me write my code the way I want, a la C++, than a language that requires a strict paradigm from academia like Lisp. If I want to use the inherent hardware property based side effects of certain code structures, let me. Programming languages =/= mothers.

      2. Difficulty. 90% of programmers (not on the internet, in general) write code like Fortran when its 2010. The most popular languages now, C# and Java, are popular because they are extremely easy to understand, if not easy to get things done in. You dont need to know lambda calculus or templates or prototyping to understand 99% of C# / java code (yes, I know C# has all of those and java has 2/3 of those). The problem with functional languages is that they always use these paradigms.

      3. Most functional languages except Ocaml are like Ruby and Python in that they have tremendous performance overhead. For a consumer application, that overhead usually doesnt impede adoption (its more like the software is poorly written than the applications environment is too inefficient). But when talking about server programming the costs of running something under Ruby vs C are astronomical, and the same problem arises with functional programming. It might not hurt the consumer that the Python implementation of their music player consuming 30% more clock cycles than the exact same program written in C, but it does cause huge scaling issues with popular resources like Twitter.

      4. In extension of 3, functional programming is getting away from how the hardware actually works. It is good for a novice that doesnt want to get into the details of pointers and caching and disk IO, but professionals should enter the game knowing how the underlying system runs and that making tradeoffs for readability by someone who doesnt know the language anyway vs performance benefits falls to the wayside. Developer time is important, but when you factor in the massive overhead trying to get 20+ year professional developers in C to try to think functionally you are never justifying the upfront cost of using the languages.

      I mean, I dont use them. Thats personal preference. I like the way C and OO work more than I like dynamic typing and having no data and all the other out of this world paradigms. I really hope that D can achieve what I hope it will evolve into, a language that is hopefully as easy to understand as Python without the boilerplate of Java but with the performance of C. Thats kind of where the end goal of programming languages needs to be.

    4. Re:Pffft. by wed128 · · Score: 5, Insightful

      C is like Oil Paints. Python is like water-soluble markers.

      You can make artwork with both. you can also make a complete mess with both. This argument is silly.

    5. Re:Pffft. by tqk · · Score: 4, Interesting

      no, but really, C is a good, but old language.

      Cobol's even older. And Fortran's long been known to perform math calculations better than most other languages (though that may not still be true). Yada yada.

      What I wonder about is, whatever happened to Black Box programming? Why do we need to care what language is used, as long as we understand its interface? Systems programming in C regularly calls assembly for the grottier hardware specific bits. Pretty much any modern language can call a function's object code written in another language.

      Yeah, let's just keep on reinventing wheels. That's always worked so far.

      --
      "Tongue tied and twisted, just an Earth bound misfit ..." -- Pink Floyd.
    6. Re:Pffft. by pclminion · · Score: 5, Insightful

      For system-level native tasks, C is better.

      Just because you're using C++ doesn't mean you need to write some glorious object-oriented dynamically-dispatched exception-throwing operator-overloading dynamically-dispatching self-reflecting monstrosity. C++ provides several very fundamental features which make it hugely superior to C: inline functions, better const semantics, reference types, and templates. If you don't want to write enterprisey crap, don't. But don't chuck out the baby with the bath water.

    7. Re:Pffft. by Anonymous Coward · · Score: 4, Insightful

      One of the problems with new languages is that everyone starts out stupid.

      You clearly don't have a CS background, but rather are a programmer. If you understand the fundamentals you're not going to be "stupid" in any language. Programmers are simply trained to use one or more tools. I have a cousin, for example, who has a Master's degree in Music. Even with an instrument he's wholly unfamiliar with, like an obscure tribal instrument, he can generally figure it out and play it. That's the difference between him and some guy who taught himself to play guitar.

    8. Re:Pffft. by shutdown+-p+now · · Score: 4, Insightful

      Pure FP is not winning, but elements of FP have sneaked into all major imperative languages of the day. C# has lambdas for 6 years now, VB for 3 years. C++ has just got them, and Java is getting them in the next release. All these also have (in case of Java, will have) their equivalents of map/filter/reduce.

  2. No, we don't by Anonymous Coward · · Score: 5, Funny

    Obligatory XKCD. http://xkcd.com/927/

  3. The reason by bonch · · Score: 4, Interesting

    The reason popular languages move more slowly is because established codebases use them. Backwards compatibility is a good thing. If C++ was radically changing all the time, code that compiled a year ago wouldn't run anymore. Stability and predictability are just as important, if not more so, than radical change when it comes to real-world development.

  4. Just recycle the old ones .. by ackthpt · · Score: 4, Funny

    Algol for Web, COBOL beans, Object Oriented PL/1 ...

    --

    A feeling of having made the same mistake before: Deja Foobar
  5. Re:lets reconstitute the ADA committee by mbkennel · · Score: 5, Insightful

    The Saturn V was designed by many committees.

    And for the time Ada is not a bad language at all, especially if you're mature enough to know that the quality of the result is more important than you.

  6. Re:Just Let the Dinosaurs Die by bonch · · Score: 4, Interesting

    Seriously I'm sick and tired of defending new languages like Clojure, Go, Dart, Ruby, etc. I'm just going to shut up and let the dinosaurs stagnate and get stuck maintaining all the old code for the rest of their unenjoyable never changing ruts.

    Your criticisms seems to be based solely on whether or not code is old. If the code works, why is that even a consideration for you? Does it have to be new code to be any good? I hope you're aware of how silly that sounds.

    As for languages like Clojure, Go, Dart, and Ruby, those languages have deficiencies that warrant legitimate criticism. If you're sick and tired of defending them, don't read anything on the internet, because you'll never completely avoid criticism of things you like.

  7. No, we need one *better* language, not "more" by gestalt_n_pepper · · Score: 4, Insightful

    No language is perfect. The idiocy of language designs stem from the fact that few, if any programming languages were designed by anyone who had ever read a book on psychology, ergonomics or human factors.

    There's a saying floating around the internet that "Languages should be easy to read and understand and incidentally be compilable by computers." That about sums it up.

    THE COMPUTER DOES NOT MATTER. It is a means to an end. It's only purpose is to serve humans. The languages designed to provide a system level interface to that machine need to be designed around what a human understands, the way a human understands it. Slavish devotion to a hardware design, or even an object model is plain stupid if it makes your product nearly unusable (e.g. the WPF datagrid).

    --
    Please do not read this sig. Thank you.
  8. Slash-CAllister by MikeTheGreat · · Score: 4, Funny

    Is it just me, or has almost every article by Neil McAllister made it to the Slashdot front page?

    I propose
    1) a "slashcallister" because it rolls off the tongue, and can be used to tag these articles (as part of the greater "slashonomy"), so that
    2) McAllister's articles be picked up by Slashdot's server-side RSS reader and auto-posted & auto-tagged, thus creating the Official Slashdot Neil McAllister Channel

  9. Query Languages by Tablizer · · Score: 5, Interesting

    We have only ONE relational query language in common use: SQL. We need more options. SQL is hard to extend by DBA's, emphasizes nesting over named-references, has a messy COBOL-like syntax structure, and other annoyances.

    We have bajillion app languages, but very few query language choices. There is the Tutorial-D language family which spawned REL, but it's more of a tight-typing/compiled style.

    We also need something more dynamic. I've proposed a draft query language called "Smeql" (Structured Meta-Enabled Query Language, pronounced "smeegol") for such. You can "calculate" column lists using dynamic queries, for example.

    It's a far far needier field than app languages.

  10. Python is a bad example by Hentes · · Score: 4, Interesting

    Python is actually an example of how can a language continue to develop even after becoming popular. In a brave move, they didn't let backwards compatibility tie them down. By breaking compatibility, the language could continue to evolve: there are many new features in Python3. For this to work without breaking existing stuff, the __future__ module was invented, which allows creating 'forward compatible' code.

    I think we don't necessarily need to constantly switch languages to evolve, getting rid of backwards compatibility is another way to go (or make the language very general like LISP).

  11. Re:No, we need one *better* language, not "more" by PatDev · · Score: 4, Informative
    The idiocy of this comment stems from the fact that it's author must have no experience in programming language design. We are all quite aware that humans are the primary users of our languages. The problem is that it's not helpful to have the peanut gallery always yelling "that one doesn't make me happy, make it more soft and people-like. I don't want to have to map my mental model - make it map its".

    It's all well and good to say "make it understand English", but there are two primary problems with this. First, natural language programming is hard. Really hard. Just getting a computer to understand English with any reasonable reliability is pretty far in the future, and we can't wait for that. Second, we as humans don't really have much success expressing exactly what we want. It's why the most insidious bugs are not in code, but in specification. We so often don't know quite what we want that restrictive languages are actually beneficial, in that they force us to reason consistently.

    And it's not some "saying floating around the internet", it's a very famous quote from Structure and Interpretation of Computer Programs, a seminal text in basic programming language theory and compiler/interpreter design. Most importantly, it's probably the first book you should read if you want to intelligently discuss this topic.

    Another quote you might find interesting:

    When someone says "I want a programming language in which I need only say what I wish done," give him a lollipop.

    - Alan Perlis

    In short, from someone who likes to design programming languages - stop assuming that just because the problem is easy to understand that it is easy to solve. We're not all basement-dwelling geeks who think UNIX is the pinnacle of end-user usability and newbs should just get over it. We aren't pretending that there is no problem, and we're not refusing to educate ourselves on how to solve it.

  12. Re:Talk about missing the point. by Pseudonym · · Score: 5, Insightful

    Performance doesn't matter any more.

    Of course it does. Every programming task has to care about performance. What's changed is that the most important type of "performance" is different for every task. Most of us aren't doing large-scale numeric simulations.

    If you're programming desktop GUI applications, responsiveness is usually more important than throughput. If you're programming mobile devices, battery efficiency is more important than any other consideration.

    I think it was P.J. Plauger who pointed out that if the program to process the monthly payroll takes three months to run, it's useless.

    What I think you meant to say is that for most programs, whether or not they meet their performance criteria is not limited by CPU cycles. That's certainly true. Most programming tasks can afford to spend some cycles if in return for correctness, programmer productivity or ease of maintenance.

    --
    sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  13. Re:Talk about missing the point. by deKernel · · Score: 4, Insightful

    Performance doesn't matter any more. Correctness and quick development does. FP provides that in abundance. (Of course, correctness is just another way to say "quick development" nowadays, but whatever...)

    Really, performance doesn't count, that must be nice. The two worlds that I have lived in (control systems and financial transaction processing) have performance as king because in both cases, meeting specific performance numbers means large explosions or large fines from networks. Those are naming just two areas, there are quite a few other areas, but I can only speak of the two stated above.

    1) Two words: undefined behavior. You'll find it around every corner in C or C++ (two very different languages, of course) -- this leads to unreasonably hard-to-find bugs. In C++ it's also extremely hard to avoid such behavior consistently -- compilers are happy exploit it for optimizations, but somehow can't provide warnings for all cases where you are (unwittingly) relying on UB.

    I have found that ~90% of the "undefined behavior" is caused by people not properly checking argument values. That is the nature of imperative languages, if you don't know or understand that, I question whether you should be writing code then, sorry.

    2) Really? Haskell or Ocaml do not rely on any of those things you mentioned. Difficult? Perhaps, but see my point #1. Besides, who would you like making your software... someone who's just "learned java" or someone who knows what the fuck they're doing?

    See the above point of my argument...and nice language.

    3) So all FP languages which don't perform as well as C (or order-of-magnitude at least) don't perform as well as C. What an insight. Btw, Haskell is also within OoM of C. Also, see the top of this post

    Sarcasm really doesn't help make your point here.

    4) How hardware works is fucking irrelevant. If compiler for language X can optimize "fib N" to a constant expression it doesn't matter if your C compiler can generate code which executes a million iterations of a fib-computing loop per second. Certainly, we're not quite there yet, but in the C world there's no hope of doing this beyond *really* simple examples (aka not fib), but FP could conceivably get further. (TC is a barrier, but you can still do useful computation even without TC.

    Actually, I have found that understanding just how hardware works makes finding solutions to problems a whole lot easier. Computers function in a particular manor, and I have found that they mirror life more closely than functional languages. Now granted, that is my perception, but the fact that functional languages are still used only in a few disciple sure enforced my opinion.

    After rereading the parent comment, I think your perceived attitude of the author is way out of line. He stated his case clearly AND WITHOUT PROFANITY. I have been developing software for 17+ years, and after all that time, paradigms come and paradigms go, languages come and languages go just like management styles. What matters the most is the person at the keyboard designing and developing the solutions. I can't even count the number of languages that have come and gone through the years, but C and C++ have always been there. I have stopped fighting the fight of "..this language is better because..." and just learned to use both of those languages better. I produce products faster with far fewer defects so I am happy.

    Guess at this point I just need to yell "GET OFF MY LAWN" to complete my old grumpy statements.