Language Design: Use Consistent Keyword Length

Published on 2018-09-07.

6 letters namespaces – declaring namespaces and bringing namespaces into scope:

  • module (unifies “object” and “package”)
  • import

5 letters type declarations:

  • class (reference type)
  • value (value type, alternative to struct)
  • union (alternative to enum)
  • trait (interface/typeclass)
  • alias (type alias)

4 letters control flow:

  • case
  • then
  • else
  • loop

3 letters member declarations:

  • fun (function)
  • let (immutable binding)
  • var (mutable binding)

Unused alternatives:

6 letters “invasive” control flow (unlikely to be used):

  • return
  • throws

2 letters control flow:

  • if
  • do
  • or