Are EK9 banned names the same as Java reserved keywords?
← Variable Naming Rules and Conventions · Ref: Q921
NO. EK9 banned names are descriptive names like temp, value, data — NOT language keywords. Java reserved keywords are things like 'class', 'public', 'void'. EK9 banned names are generic identifiers that carry no semantic meaning.
EK9 banned names are NOT Java reserved keywords. They are quality enforcement — the compiler rejects names that hide intent.
EK9 bans exactly 12 non-descriptive names (E11031): temp, tmp, flag, flg, data, dat, object, obj, value, val, buffer, buf. These are case-insensitive. Names like str, num, item, result, input, output, count, index, list, map, set, key, status, state, type, config, param, arg, var, ret, res are NOT banned.
Separately, E11032 bans operator keywords as variable names: empty, length, contains, abs, sqrt, close, matches.
ALWAYS ALLOWED EXCEPTIONS:
- Single-character names: x, y, z, i, j, k (math variables, loop counters)
- Compound words: connectionState, dataProcessor, bufferSize
- Descriptive names: customerName, orderTotal, retryLimit
Example
defines module qa.naming.notjava defines function <?- Shows descriptive naming — banned names are NOT keywords. -?> computeDiscount() as pure -> originalPrice as Float discountRate as Float <- discountedPrice as Float: originalPrice * (1.0 - discountRate) defines program NotJavaKeywordsDemo() stdout <- Stdout() // 'result' is banned — NOT a keyword, just non-descriptive computedScore <- 88 stdout.println(`Score: ${computedScore}`) // 'value' is banned — use what it represents originalPrice <- 49.99 discountedPrice <- computeDiscount(originalPrice, 0.15) stdout.println(`Price: ${discountedPrice}`) // Compound words with banned roots: ALLOWED bufferSize <- 1024 stateCode <- "TX" stdout.println(`Buffer size: ${bufferSize}, State: ${stateCode}`) // Single-char math vars: ALLOWED x <- 10.0 y <- 20.0 stdout.println(`Point: ${x}, ${y}`)
Common mistakes
E11031 — The name 'val' is banned (E11031) — it is not a keyword but a generic non-descriptive name. Use a name like 'computedScore' that describes what the value represents.
Incorrect:
val <- 88 stdout.println(`Score: ${$val}`)
Correct:
computedScore <- 88 stdout.println(`Score: ${computedScore}`)
Other ways to ask this
- Is 'data' a keyword in EK9?
- Are banned names language keywords?
- Why is 'temp' banned if it is not a keyword?
Keywords: reserved, naming, E11031, java, keyword, banned