Skip to content

Instantly share code, notes, and snippets.

@alexispurslane
Last active January 2, 2024 23:38
Show Gist options
  • Save alexispurslane/c0edfa1849cdd4b53b851cc4dde6cd8a to your computer and use it in GitHub Desktop.
Save alexispurslane/c0edfa1849cdd4b53b851cc4dde6cd8a to your computer and use it in GitHub Desktop.
An Informal Look At Language Sizes in 2023

An Informal Look At Language Sizes in 2023

Note

We are not counting standard library specifications, since not every language included specifies their standard library as part of the language specification, so it wouldn't be fair, and also the size of a standard library is usually a positive thing whereas the size of the language itself is usually a negative thing so including both of those in the same statistic would be misleading.

Note

Where a language specification was not available and a cursory review of the language reference revealed that the reference was roughly as rigorous as a specification would be — including a formal grammar and specification of semantics alongside a few examples — the reference was used in place of a specification.

Note

While all of the language specifications and the OCaml language reference were all available as PDFs and use similar font sizes and formatting, the pdf version of the Rust reference manual merely printed out the web page and ended up with a much larger font size, so I had to make my own (just converting the print page HTML to a PDF using pandoc with the default settings except for margins equally 0.8in and font size being 11pt), which should explain any discrepancies you see between my page count for Rust and what you observe if you just look at the Rust reference PDF.

Warning

This is not intended to start a flame war about whose language is better, because whether a large language with a lot of tools for dealing with problems, or a small language that is easy to keep in your head and hard to be surprised by, is better, is often determined by personal preference and the specific team and project you are working on. Additionally, this would be extremely bad data to base any argument on anyway because it's extremely back of the napkin. Additionally you can have a poorly designed small language and a well-designed, clean, and orthogonal large language, so it really isn't a proxy for the quality of the language design either.

  • C spec: 190 pages
  • Haskell spec: 152 pages
  • Go spec: 114 pages
  • OCaml ref: ~304 pages
  • C++ spec: ~490 pages
  • C# spec: ~650 pages
  • Java spec: ~850 pages
  • ECMAScript spec: ~440 pages
  • Common Lisp spec: ~800 pages
  • R6RS Scheme spec: 83 pages lmao
  • Ada spec: ~452 pages
  • Rust ref: ~303 pages

Now, just for fun, including standard libraries:

  • C: 455 pages
  • C++: 1704 pages
  • Ada: 1124 pages
  • Haskell: 295 pages
  • OCaml: 987 pages
  • ECMAScript: 815 pages
  • Common Lisp: 1000 pages
  • R6RS Scheme: 120 pages
@alexispurslane
Copy link
Author

Here's a bar chart:

bar-graph(1)

@alexispurslane
Copy link
Author

Another note: I used CLtL 2nd ed for Common Lisp. I know it isn't perfectly accurate, but I couldn't find a PDF version of the spec.

@alexispurslane
Copy link
Author

Also note: OCaml and Rust being within 1 page of each other was utterly was accident btw I was trying to match the Rust document's formatting to just the average of the rest of the documents, mostly the C++ one.

@alexispurslane
Copy link
Author

alexispurslane commented Jan 2, 2024

Bar chart of library + language specs
bar-graph(2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment