Language Design: Use Consistent Keyword Length
Published on 2018-09-07. Last updated on 2023-09-16
6 letters namespacing – declaring and managing namespaces:
module
(unifies “object” and “package”)import
export
5 letters “big” definitions (types):
class
(reference type)value
(value type, alternative tostruct
)union
(alternative toenum
)trait
(interface/typeclass)alias
(type alias)mixin
4 letters control flow:
case
/then
/else
orwhen
/then
/else
loop
(alternative towhile
)skip
(alternative tocontinue
)exit
(alternative toreturn
)yeet
(alternative tothrow
)
3 letters “small” definitions (members):
fun
(function)let
(immutable binding)var
(mutable binding)
Unused alternatives:
6 letters “invasive” control flow:
return
throws
2 letters control flow:
if
/do
/or