const
declares a constant that must be const expression and the type of it must be annotated.let
declares a variable, which can be immutable/mutable.i32
, default floating point type is f64
.(a,b,c)
can be accessed by index, e.g. tu.0
, tu.1
, etc..()
is called unit type, and the value is called unit value. Expressions implicitly return the unit value if they don’t return any other value.let a: [T; N] = [x1, x2, ..., xn];
T
is the element type, N
is the number of elements.