Chomik’s Unique Approach to Variables: Compound Names and Explicit Evaluation

Pawel BiernackiPawel Biernacki
3 min read

Most imperative programming languages—from Fortran to Java—share two unwritten rules about variables:

  1. A variable name is a single identifier (like counter or playerHealth), possibly with underscores or camelCase.

  2. The same name is used for assignment and retrieval—you write it once and the compiler knows you mean the same thing.

Chomik breaks both of these conventions in an elegant, unconventional way.

1. Variable Names in Chomik Are Not Just Identifiers

In C++, Pascal, Java, or most mainstream languages, a variable name is something like:

int myVariable = 42;

In Chomik, a variable name can consist of multiple identifiers mixed with literal values—including integers, floats, strings, booleans, or even other pieces of code.

For example:
variable something with a name consisting of multiple identifiers and literals 1 "hallo" 3.14159 5: integer;
let something with a name consisting of multiple identifiers and literals 1 "hallo" 3.14159 5 = value integer 12345;
<print <something with a name consisting of multiple identifiers and literals 1 "hallo" 3.14159 5>>;

Yes, that’s all one variable name. No arrays, no structs—just a variable whose name contains identifiers and literal values. The output of this program is:
12345

And we can take it even further: a variable name in Chomik can be just literals—no identifiers at all:

variable 1 "hallo" 3.14159 5: integer;
let 1 "hallo" 3.14159 5 = value integer 12345;
<print <1 "hallo" 3.14159 5>>;

This prints:
12345

2. Explicit Evaluation with < >

In most languages, variable evaluation is implicit: you just write the variable name and you get its value.

In Chomik, you must use triangular brackets < > to explicitly evaluate a variable.
This makes the distinction between naming a variable and evaluating it completely clear.

  • Defining a variable: You write the full name directly.

  • Evaluating a variable: You enclose its full name in < >.

Example:
let a 1 = value integer 2;
<print <a 1>>;

This explicit evaluation makes nested lookups possible without extra syntax. In C++ or Java, to access nested data you might write:
array[index]

In Chomik, you can simply combine evaluations:
let index = value integer 1;
let a 1 = value integer 2;
<print <a <index>>>;
Here, <index> evaluates to 1, and <a <index>> evaluates to <a 1>, which is 2.
No [] operator needed—just pure evaluation nesting.

Why This Matters

Chomik’s variable naming and evaluation model isn’t just a novelty—it changes how you structure data and logic:

You can represent structured data without arrays or maps.

  • You can generate variable names dynamically at runtime.

  • You have full control over when and how evaluation happens.

These two features—compound variable names and explicit evaluation—make Chomik fundamentally different from most imperative languages and open the door to creative, dynamic programming patterns.

0
Subscribe to my newsletter

Read articles from Pawel Biernacki directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pawel Biernacki
Pawel Biernacki

I was born in 1973, in Cracow, Poland. I am a software engineer.