Tuesday, March 28, 2017

Programming Languages by Spec Size

I was curious which programming language has the smallest specification.  Which one has the largest?  For each language, I printed the spec to a PDF and counted the pages.  Self 2017.1 is the smallest.  C++ is the largest.

This is a very rough estimate of language complexity since each specification varies in style and purpose.  I tried to count only the language specification. For example, I didn't count Annex A in the Prolog spec since it's only informative.  For Haskell 2010, I didn't count Part II - Libraries which defines the standard library, not the language.  Anyway, here's the list:

If you'd like me to add other languages, comment with a link to the spec and I'll update this post.

11 comments:

  1. C# please.

    https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf

    ReplyDelete
  2. Thanks. I've added C#. It's similar in size to JavaScript.

    ReplyDelete
  3. Common Lisp (even although I'm pretty sure it'll be the largest). Some may say it's irrelevant, but is Scheme anymore relevant?

    ReplyDelete
  4. I'd be glad to add Common Lisp, but I've had no luck finding a PDF (or otherwise printable) copy of the spec. If you can point me towards one, I'll include it here. Thanks.

    ReplyDelete
  5. I've added Lua 5.0 (the most recent spec for which I could find a PDF) and shell command language (/bin/sh). Lua's spec is smaller than Go's, so I updated the text accordingly.

    ReplyDelete
  6. I added Standard ML and OCaml

    ReplyDelete
  7. I added Self 2017.1, Newspeak, and Smalltalk-80. I also adjusted Prolog and Haskell by omitting lengthy appendices that don't really define the language.

    ReplyDelete