What is the complete list of banned variable names in EK9?

← Variable Naming Rules and Conventions · Ref: Q920

EK9 bans exactly 12 non-descriptive variable names at compile time via E11031: temp, tmp, flag, flg, data, dat, object, obj, value, val, buffer, buf. The check is case-insensitive (Data, DATA, data all rejected).

These are NOT Java reserved keywords. They are generic, meaningless identifiers that hide intent. 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 — only the 12 names above trigger E11031.

Separately, E11032 bans operator keywords as variable names: empty, length, contains, abs, sqrt, close, matches. These shadow operators and cause confusing parse errors.

ALWAYS ALLOWED EXCEPTIONS:

- Single-character names: x, y, z, i, j, k (math variables, loop counters)
- Compound words containing banned roots: connectionState, errorHandler, dataProcessor
- Type-qualified descriptive names: orderCount, sensorReading, customerName

See Q290 for tiers of restriction. See Q906 for a renaming guide.

Example

defines module qa.naming.completelist

  defines function

    <?-
      Demonstrates descriptive naming replacing banned names.
    -?>
    measureTemperature() as pure
      -> sensorReading as Float
      <- adjustedReading as Float: sensorReading + 0.5

  defines program

    CompleteListDemo()
      stdout <- Stdout()

      // GOOD: descriptive names instead of banned names
      sensorReading <- 42.5
      adjustedReading <- measureTemperature(sensorReading)
      stdout.println(`Reading: ${adjustedReading}`)

      // GOOD: single-character math variables (always allowed)
      x <- 3.0
      y <- 4.0
      stdout.println(`Coordinates: ${x}, ${y}`)

      // GOOD: compound words with banned roots (always allowed)
      connectionState <- "active"
      dataProcessor <- "json"
      stdout.println(`State: ${connectionState}, Processor: ${dataProcessor}`)

Common mistakes

E11031 — The name 'data' is one of 12 banned non-descriptive names (E11031). Use a name describing what the variable represents. See ek9 -h E11031.

Incorrect:

      data <- 42.5
      adjustedReading <- measureTemperature(data)

Correct:

      sensorReading <- 42.5
      adjustedReading <- measureTemperature(sensorReading)
Other ways to ask this
  • List every banned variable name in EK9
  • What names trigger E11031?
  • Show me all forbidden identifiers in EK9

Keywords: complete, E11031, variable, naming, list, banned, forbidden