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:
- Self 2017.1 (see Chapters 3-4) - 37 pages
- Newspeak - 49 pages
- Lua 5.0 - 71 pages
- Go - 75 pages
- Shell - 83 pages
- OCaml 4.0 (see Part II) - 88 pages
- Scheme R7Rs - 88 pages
- Smalltalk-80 (see Part One) - 89 pages
- Prolog (not freely available) - 124 pages
- Nim 0.19 - 133 pages
- Standard ML '97 - 136 pages
- Haskell 2010 - 152 pages
- Dart 2.2 - 206 pages
- Ruby - 331 pages
- F# 4.1 - 333 pages
- C# - 553 pages
- JavaScript - 586 pages
- Java - 670 pages
- C 2011 - 701 pages
- Ada 2012 - 947 pages
- C++ - 1368 pages
If you'd like me to add other languages, comment with a link to the spec and I'll update this post.
11 comments:
C# please.
https://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf
Thanks. I've added C#. It's similar in size to JavaScript.
Common Lisp (even although I'm pretty sure it'll be the largest). Some may say it's irrelevant, but is Scheme anymore relevant?
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.
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.
I added F# 4.1
I added Standard ML and OCaml
I added C 2011
I added Ada 2012
I added Nim 0.19
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.
Post a Comment