About Topaz

Language Philosophy

Understand why Topaz uses consistent syntax, names in your own language, and shared behavior across execution targets.

Read the design choices behind Topaz to understand how they shape the code you write and review. The examples below connect each choice to an everyday programming task.

Make choices visible in code

For a lookup that may find nothing, use Option. For an operation that can return an error, use Result. Use defer to schedule cleanup when a scope exits normally.

These forms let readers recognize missing values, returned errors, and cleanup without learning a different convention for each program. Introducing Topaz shows error handling and cleanup together in a complete example.

Topaz keeps a consistent set of forms for common tasks. Developers and code generation tools use the same syntax and rules.

Use names from your work

Variable and function names can use Korean, Russian, or English. A team can keep the names it already uses for its data and tasks. The examples in Introducing Topaz show names from all three languages in one program.

Keep behavior consistent across targets

A supported program follows the same rules when run directly, built as a native executable, or called from a browser. Topaz defines values, evaluation order, errors, and cleanup in the language specification (SPEC). Implementations can choose how to store values internally.

The compiler rejects a program if the selected target cannot support its required behavior. If two targets accept the same program but produce different behavior under the same conditions, that difference is a compiler bug. See Interpreter & Backends to choose an output for your program.

Let working programs guide development

The Topaz compiler is written in Topaz, so developing it exercises the language on a large program. Applications and Lispex integration tests also reveal needs in strings, collections, files, recursion, and error handling.

New features come with defined behavior, a working implementation, examples, and documentation. These requirements keep language changes tied to code that developers can use.

Find current guidance and past decisions