Criticizing programming languages

Here are snippets from two conversations I had recently:

20:03 < psnively> DRMacIver: I do think of you as taking a “Scala is one of the few languages worth criticizing” stance.

llimllib @DRMacIver So by my count, you’ve been in public arguments over the quality of Scala, Java, Ruby, Lua, Haskell, and OCaml? Missing any?

psnively’s comment is of course patently untrue. I criticize all sorts of languages. It just happens that Scala is one of those I use the most (at least in my free time), so I tend to criticize it more often than others. It’s true that as I rather like it I hold it to higher standards, but I feel no problem with criticizing other languages. :-)

llimllib’s comment is much more close to home. I get into arguments about languages all over the place. The problem is that:

  • All languages have problems with them
  • There are very few languages which don’t have something good about them as well

So the first point gets me into arguments with the people who love the language, the second gets me into arguments with people who hate it. I really can’t win. :-)

So, just to piss everyone off, I figured I’d write a post about the different programming languages I have opinions on. The structure of this will be simple: For every language I feel like I’ve used enough (or at least know enough about and have used some), I will write four items: Two saying what’s good about it, two saying what’s bad about it. These points are not intended to be the best or worst things about the language, or even neccessarily representative. They’re just something that has struck me as good or bad. Also, the format practically guarantees that I’m probably not saying anything anyone else hasn’t said a few dozen times already. :-)

Scala

Good:

  • Very interesting modularity features
  • Implicit arguments are great.

Bad:

  • The standard library is pretty embarrassing
  • It’s very easy for it to look like Java with weird syntax, particularly when using Java libraries.

Haskell

Good:

  • Extremely powerful and interesting type system
  • Purity enforced at the language level often makes it much easier to write correct code

Bad:

  • Really weak support for modularity
  • Aspects of the type system make it difficult to reuse nearly identical code across different contexts (consider sort vs. sortBy and map vs. mapM).

Ruby

Good:

  • Flexible syntax and semantics make it easy to write some very terse code
  • Makes general purpose scripting tasks very easy to hack together

Bad:

  • Namespacing issues abound, between open classes and a tendency to stomp all over the global scope.
  • The implementations.

Java

Good:

  • High quality implementation, with very good JIT and garbage collector.
  • Very rich ecosystem with lots of libraries.

Bad:

  • Bindings to native libraries tend to be rather low quality or non-existent (JNI is a pain)
  • Their closest Java equivalents typically are too

C

Good:

  • Gives you a lot of fine grained control over details that higher level languages hide
  • High performance native code compilers for just about every platform ever

Bad:

  • Almost no capability for abstracting over type.
  • Language level support for modularity basically doesn’t exist – namespacing by prefixing your function names, yay.

Ocaml

Good:

  • Provides a lot of shiny new features over standard ML – lazy evaluation, row polymorphism, polymorphic variants, etc
  • Very powerful module system (which I’ll admit to not entirely understanding)

Bad:

  • If you ignore the shiny new features, the core language is basically a worse Standard ML.
  • Although it has a justified reputation for writing high performance code, this seems to be only true if you write it as if it were C.

Lua

Good:

  • Borrows many more features from functional languages (tail calls, lexical scoping, etc) than most of its peers.
  • Very embeddable, rendering it very easy to use in the context of applications where the core is written in other languages.

Bad:

  • Weirdly deficient standard library (I know this is related to ease of embedding, as it seems to be the result of a desire to keep Lua small)
  • The language can be very verbose in places – consider the use of “local” to mean “Hey, I like not stomping all over the global scope”.

Python

This one is a bit weak, as I’ve only really used python in a few contexts, and haven’t really formed any strong negative opinions about it aside from a generic mild dislike. :-)

Good:

  • Has a lot of really cool libraries / projects built on top of it. (NLTK, NumPy, Sympy, pygame, etc).
  • The batteries included philosophy of the standard library is very appreciated.

Bad:

  • I find the “there is only one way to do it” attitude of community very dogmatic.
  • I’m not a big fan of the syntax. (I know, I know).

SQL

Good:

  • Forms a nice back end for a data processing app
  • Extremely good for constructing ad hoc queries against your data model

Bad:

  • Dear god can it be verbose.
  • Total lack of standardization a pain in the ass.

Javascript

Good:

  • Pretty decent support for functional programming
  • The prototype based OO is interesting and useful.

Bad:

  • Really weird scoping issues in places (particularly behaviour of globals and “this”).
  • The implementations are weak and inconsistent

And there we have it. :-) Some of these I could probably say a lot more good and bad about, some of them I struggled a bit on one side or the other and probably couldn’t, but those tend to be the languages I’ve used the least (in particular I’ve used Lua, Python and OCaml dramatically less than I have the others on the list).

This entry was posted in programming and tagged , on by .

16 thoughts on “Criticizing programming languages

  1. Daniel

    Nice list. Let me add 2:

    C#
    Good:
    – Mainstream language that actually incorporates new shiny features
    – Helps you to earn money
    – Best Tool chain I have ever seen
    Bad:
    – Microsoft/Windows Only
    – Generics were put in as an afterthought / Every object can be null

    Delphi
    Good:
    – Nice toolkit
    – High performance
    Bad:
    – Archaic language
    – IDE, compiles – all of them are buggy as hell

    Sounds like a nice StackOverflow Question ;)

  2. James Iry

    C++

    Good:
    – All the performance capabilities of C
    – Far more abstraction capabilities than most languages out there

    Bad:
    – So complicated no two compilers, let alone programmers, understand the same language
    – High abstraction and manual memory management are a poor mix (please don’t mention RAII, smart pointers, or Boehm garbage collector – they’re either too restrictive or too conservative or both)
    – Very difficult to avoid doing massive re-compile on seemingly small changes

    Assembly

    Good:
    – You can do anything you want
    – Make hardware your bitch

    Bad:
    – You can do anything you think you want to do but mostly you probably really shouldn’t want to
    – It takes 16 pages of inscrutable code to do it

    Scheme

    Good:
    – call-with-current-continuation
    – gentle learning curve
    – hygienic macros

    Bad:
    – call-with-current-continuation
    – the standard is too small so each Scheme implementation adds its own incompatible “batteries included” language and library extensions
    – everything is mutable whether you want it to be or not which is odd in a functional language

  3. J. Sueeth

    You missed a few of my favorites:

    Zombie

    Good:
    – Inherently evil
    – Summon minions to do thy bidding
    Bad:
    – Inheriently evil
    – Summons minions who may not do thy bidding.

    LOLCode

    Good:
    – Hilarious
    – Furry-Feline-Friendly
    Bad:
    – There are no cons with LOLCode

    Haifu
    Good:
    – Incredibly poetic and beautiful
    – Perfectly in balance with the universe
    Bad:
    – Must be a Zen Master to balance the Yin and Yang and elements to create executable code.

  4. david Post author

    With most people I’d question whether they’d really written enough lolcode to justify contributing it to this list. I think I’ll take your word for it though. :-)

    How’s the work coming on rewriting the lolcode eclipse plugin in lolcode?

  5. mikiobraun

    I really like your list. I think when you start learning to program, you still believe that there is “the best programming language ever”. But then, you start to understand that each programming language stands for a certain view on computation, and it’s hard to say that a one is uniformly better than all others for all kinds of uses.

    C++

    Good
    – As fast as C
    – Gives you quite a few tools for abstraction (e.g. templates, object oriented programming)
    Bad:
    – Painfully verbose (retype full declarations in header file and implementation file?)
    – Basically an experiment how much abstraction you can put into a language and still compile it to assembly code.

    LISP

    Good
    – really old (extra coolness factor)
    – gives you about every cool concept that has ever been invented (e.g. GC, macros, functions as objects, object-oriented programming)
    Bad
    – Parenthesis everywhere
    – Is there any maintained implementation besides Emacs?

    Also, you mind find this older post by Steve Yegge interesting: http://steve.yegge.googlepages.com/tour-de-babel

    Paul Graham had also an interesting chapter in his book “Hackers and Painters” claiming that you always believe that your current programming language is the best one because it obviously is better than everything you’ve used so far, and you yet don’t understand the more advanced programming languages.

  6. Daniel Weinreb

    There are eleven currently-maintained implementations of Common Lisp. See my survey paper at http://common-lisp.net/~dlw/LispSurvey.html. I work at ITA Software, where we are building a high-availability, high-performance, full-function airline reservation system, whose core layer is written in Common Lisp, about 500KLOC. There are many, many Common Lisp success stories (see the paper).

    The parentheses are something you get used to very quickly, and Lisp development environments such as Emacs make them far easier to use. Nevertheless, I know they look weird to people who haven’t used them.

    Regarding the Paul Graham paper, those of us who have used a lot of languages and do understand the more advanced ones don’t think any language is “best”. There are lots of tradeoffs. When I was a teenager at the beginning of the Lisp machine project at MIT, I was a Lisp bigot, but no more. Lisp is great; I do all my work in it these days, and I am general chair of the upcoming International Lisp Conference (ilc09.org – register now!!), but I respect a lot of other languages. I recently starting learning Haskell, which everybody should do: it’s mind-blowingly cool, and very different from anything else. Next up: Clojure.

  7. david Post author

    Just as a heads up: Comments so far have been fine, but I will actively delete comments that look like they’re turning into a languages flame war.

  8. Basu

    I’m currently working on a moderately sized python project, so I would like to add:
    Good:
    1. The module/package system is clean and easy to use.
    Bad:
    1. The standard GUI toolkit sucks.
    2. The explicit reference to self can be a syntactic pain in the ass when you’re doing heavy OO.

  9. Pingback: Best of drmaciver.com | David R. MacIver

Comments are closed.