Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

Fuzion Keywords

Trade-off between readability and conciseness

A programming language essentially consists of keywords, special symbols, constants and names. The choice of keywords and special symbols fundamentally influences the verbosity of the language on the one hand, and the readability, in particular to developers new to the language.

As an example, the syntax for a class to inherit/implement another class or interface. In Java, this might look as follows using keywords extends and implements

class A extends B implements I {
  ..
}

While C++ uses the colon symbol instead of a keyword

class A: B, I {
  ..
}

Eiffel has a keyword inherits used for class inheritance

class A
inherits B; C
end

Limiting name space for identifiers

The use of many and short keywords restricts the names available to the developer for their symbols.

Design principle for Fuzion

Fuzion keywords should be chosen wisely keeping them readable, but short, preferably 2-4 characters.

Examples:
  • fn, *.fun**, function, λ
  • require, req, precondition
  • ensures, ens, postcondition
  • invariant, inv
  • synchronized, sync
  • private, priv
  • variable, var
  • check, chk, assert, ass
  • value, val
  • inherits, inh, extends, implements, :
  • begin / end, { / }
last changed: 2024-06-28