Project

Language Philosophy

Understand why Topaz keeps one way to say each thing, uses names from your work, and behaves the same across execution targets.

When code that does the same job always looks the same, even an unfamiliar program reads quickly. Topaz's design starts from that idea.

One way to say it

Topaz settles on one way to write each common task. String conversions and collection operations are methods on the value. You convert a string to an integer with raw.toInt() and filter an array with tasks.filter(f). With no second spelling for the same job, you can read someone else's code without learning a new convention.

Show exchanges with the outside in code

Printing to the screen also uses a standard module. You write import std.io and call io.writeLine. Files and standard input go through standard modules such as std.io and std.fs too. Because a program's exchanges with the outside world show in its code, a reviewer can find where input and output happen right away.

Tell absence from failure

A missing value and a failed operation are different facts. Topaz uses Option when a value may be absent and Result when an operation may fail, so readers can tell the two apart. Cleanup that should run when a scope exits normally goes in defer. Introducing Topaz shows error handling and cleanup together in a complete example.

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 Execution Targets to choose an output for your program.

Let working programs guide development

The core of 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. Built with Topaz explains what the compiler does.

Find current guidance and past decisions