Which keywords from other languages are excluded from EK9?

← Getting Started · Ref: Q786

EK9 deliberately excludes several keywords from other languages. These are not missing features — they were designed out of existence based on decades of evidence.

EXCLUDED KEYWORDS

- goto (E01076): Creates spaghetti code. Apple SSL bug (2014) caused by goto.
- def (E01077): Python keyword. EK9 uses indentation-based declaration.
- elif (E01078): Python keyword. EK9 uses 'else if' (two words).
- None (E01079): Python keyword. EK9 uses tri-state (unset, not null/None).
- self (E01080): Python keyword. EK9 uses 'this' for instance reference.
- semicolons (E01074): Not needed. EK9 uses newlines as statement terminators.

ALSO EXCLUDED (not keywords but designed out)
- break, continue, return: See Q84-Q85 for why and alternatives.
- null: EK9 uses tri-state semantics instead.

THIS EXAMPLE

Shows correct EK9 patterns that replace these excluded constructs.

See Q274-Q281 for common AI mistakes. See Q84 for why no break/continue. See Q85 for why no return.

Example

defines module qa.gettingstarted.excludedkeywords

  defines program

    GradeChecker()
      -> score as Integer
      stdout <- Stdout()

      excellentThreshold <- 90
      goodThreshold <- 60

      if score > excellentThreshold
        stdout.println("Excellent")
      else if score > goodThreshold
        stdout.println("Good")
      else
        stdout.println("Needs work")

      stdout.println("Done")

Common mistakes

E01078 — The name 'elif' is an excluded keyword from Python and cannot be used as an identifier in EK9. Use 'else if' for chained conditions, and choose a different variable name. See ek9 -h E01078 for details.

Incorrect:

      elif <- 60

Correct:

      goodThreshold <- 60

E01074 — EK9 does not use semicolons. Newlines are statement terminators. Remove the semicolon. See ek9 -h E01074 for details.

Incorrect:

      stdout.println("Done");

Correct:

      stdout.println("Done")
Other ways to ask this
  • Why does EK9 reject goto, def, elif, None, and self?
  • What triggers E01076 goto not supported?
  • Why does my Python-style code fail in EK9?

Coming from another language?

Python: def, elif, None, self are core keywords. Java: goto is reserved but unused, semicolons required. C/C++: goto exists, semicolons required. Rust: no goto, no null (Option instead). Go: goto exists but discouraged, no semicolons needed. EK9: all excluded at the grammar level — compiler rejects them with specific error messages.

Keywords: excluded, semicolon, keyword, None, E01080, self, E01079, E01077, goto, E01078, E01076, elif, def