Richard Kenneth Eng
Jan 5, 2018 · 2 min read

Here’s a useful metric for programming language complexity: the number of keywords or reserved words in the language. This corresponds roughly to the number of language features and, hence, the size of the language.

  1. F# — 69 + 8 from OCaml + 26 future = 103
  2. C# — 79 + 23 contextual = 102
  3. C++ — 93
  4. Swift — 93
  5. Kotlin — 30 + 17 soft + 29 modifiers + 2 special = 78
  6. PHP — 67
  7. Nim — 66
  8. JavaScript (or ECMAScript)—64 (or 34 + 7 future = 41)
  9. Dart — 56
  10. Haskell — 55
  11. Rust — 35 + 17 future = 52
  12. Java — 50
  13. Perl — 40
  14. Scala — 40
  15. Ruby — 39
  16. Julia — 38
  17. Objective-C — 37
  18. Scheme — 37
  19. Python — 33
  20. C — 32
  21. Go (or Golang )— 25
  22. Lua — 21
  23. Elixir — 18
  24. Smalltalk — 6

Note that for JavaScript, if you’re working with legacy code, you may have to deal with the larger language (64 keywords).

The metric isn’t perfect but it provides a reasonable indicator of complexity. Obviously, C++ and Swift are very large and complex languages. F# has the potential to be the most complex language on the list.

JavaScript is considerably more complex than Java, and ECMAScript is certainly more complex than Python.

Smalltalk. What can I say? Languages don’t get any simpler than this one (except for Forth).

Richard Kenneth Eng

Written by

Mr. Smalltalk: https://medium.com/p/domo-arigato-mr-smalltalk-aa84e245beb9

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade