What features from other languages does EK9 deliberately exclude?
← Getting Started · Ref: Q880
EK9 DELIBERATELY EXCLUDES these features. They are not missing — they were removed based on decades of production bug evidence:
NO break — use 'head N' in streams or guard expressions instead
NO continue — use 'filter by' in streams instead
NO return — declare the return variable with '<-', compiler ensures all paths set it
NO null — EK9 uses tri-state (absent/unset/set) with the '?' operator
NO type casts — use promotion '#^' or explicit conversion
NO switch fallthrough — each case is independent, use comma-separated values
NO public keyword — methods are public by default, 'public' is redundant and rejected
NO new keyword — constructors are called directly: 'MyClass()' not 'new MyClass()'
NO semicolons — indentation defines scope
NO braces — indentation defines scope
The grammar literally does not contain these keywords. You cannot write 'break' — the parser will reject it.
See Q144 for no break/continue/return. See Q145 for replacements. See Q29 for no null.
Example
defines module qa.getting.started.exclusions defines constant TEEN_AGE <- 13 ADULT_AGE <- 18 defines function classifyAge() as pure -> years as Integer <- rtn as String: "unknown" //No 'return' — set rtn on each path if years < TEEN_AGE rtn: "child" else if years < ADULT_AGE rtn: "teenager" else rtn: "adult" defines program ExclusionsDemo() stdout <- Stdout() //No 'new' keyword — just call the constructor names <- List() of String names += "Steve" names += "Limb" stdout.println(`Names: ${length names}`) //No 'null' — use ? to check unsetName <- String() if not unsetName? stdout.println("Name is unset, not null") stdout.println(classifyAge(25))
Other ways to ask this
- What can't I do in EK9 that I can in Java or Python?
- Why is EK9 missing break continue and return?
- What keywords don't exist in EK9?
Coming from another language?
All languages: these features exist everywhere else. EK9: removed from grammar entirely. Not deprecated, not warned — gone.
Keywords: fallthrough, missing, exclude, design, break, return, null, cast, continue