Diagnostics
Jiang diagnostics are still improving as the compiler matures. The language already has a few rules that are worth checking first when a program fails to compile.
Missing Semicolons
Section titled “Missing Semicolons”Statements generally end with semicolons:
Blocks used as expressions are the main place where the final expression may carry the value of the block.
Type Suffixes
Section titled “Type Suffixes”Type-level ! is valid only on references and raw pointers: T&! is a unique mutable reference and
T*! is a writable raw pointer. Other type-level forms are invalid:
Numeric Conversions
Section titled “Numeric Conversions”Jiang does not implicitly promote already-typed numeric values:
Use an explicit target type:
Mutability
Section titled “Mutability”Put ! after a binding name when that variable, parameter, global, or field must be reassigned:
The same rule applies to fixed arrays:
Imports
Section titled “Imports”Imported public declarations are accessed through the module namespace:
If a name cannot be found, check whether it needs the module prefix or an explicit public declaration in the imported file.