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:
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:
topaz check forbidden-deferred.tpz
topaz run forbidden-deferred.tpz
The output is:
3This 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 tried | Use instead |
|---|---|
mut let count = 0 | let mut count = 0 |
count++ or count-- | count = count + 1 or count = count - 1 |
[T] in a type | Array<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 .length | text.scalars() and Array operations |
async or await | An 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.