Program Structure

Forbidden & Deferred Forms

Replace familiar but unsupported spellings with the current canonical Topaz form.

Use this page when topaz check rejects syntax that looks familiar from JavaScript, Python, Rust, or an earlier Topaz draft. A familiar spelling is not accepted as a second dialect. Usually there is a direct current form; when there is not, the capability is unavailable rather than partially supported.

Check a program that uses the current forms

Save this as forbidden-deferred.tpz:

TOPAZ
let mut count = 0
let values: Array<int> = [1, 2]
let transform: (int) -> int = value => value + 1

match values {
    case [head, ..tail] => {
        count = transform(head) + tail.length
    }
    case [] => {
        count = 0
    }
}

print("{count}")

Check and run it:

BASH
topaz check forbidden-deferred.tpz
topaz run forbidden-deferred.tpz

The output is:

Output
3

This one program demonstrates the current binding order, named collection type, callable type, lambda, and list-rest pattern.

Replace the spelling, not the meaning

If you triedUse instead
mut let count = 0let mut count = 0
count++ or count--count = count + 1 or count = count - 1
[T] in a typeArray<T>
function(T) -> U in a type(T) -> U
args: ...T...args: T
[head, ...tail][head, ..tail]
An anonymous function (...) { ... }A lambda such as value => value + 1
Backticks or ${value}Double quotes and {value} interpolation
String indexing or .lengthtext.scalars() and Array operations
async or awaitAn explicit bounded concurrent expression where that model fits

Module imports and exports have their own locked forms. Use selected imports and inline exported declarations from Modules & Visibility; do not use use, string/template module paths, export lists, wildcard exports, re-exports, or export-site renaming.

Invalid spellings above are shown as text, not as valid Topaz examples. Run topaz check before choosing a backend: the shared checker rejects these forms at the language boundary rather than asking a generated target to guess their meaning.

Unsupported is not a roadmap promise

Some rejected forms have a direct replacement. Others are deferred because their semantics are not part of the current language. Deferred does not mean that a partial implementation is safe to depend on, and it does not promise a particular future release.

The unavailable families include grapheme-cluster and direct string-slicing syntax, HTML and user-defined template tags, broader or higher-rank generic constraints, recursive type aliases, broad protocol dispatch, package re-exports, general iterable spread, asynchronous cleanup, async/await, fault catching, panic/throw/catch keywords, and optional-property pipe sugar.

Rust ownership and receiver tokens such as &self, &mut self, Vec<T>, and use crate:: belong only in explicit interop material, not ordinary Topaz. JavaScript record spread and Rust-style method blocks likewise do not become Topaz syntax merely because one generated target can express them.

Start with Syntax at a Glance for current forms. Use Operators & Expressions for operator corrections and Modules & Visibility for the exact program-structure surface.