Decimal literals:
12345
12_345
012345
Hex, oct and bin literals
0xff
0o77
0b110
can do
i8, i16, i32, i64, i128
u8, u16, u32, u64, u128
5i32
0b101i32
let x:u32 = 2
Can split out declaration and definition.
let x:u32
x = 2
Can’t do this because default immutableimmutable.
let x = 1
x = x + 1
can do
let x = 1
let x = x + 1
this is shadowing the variable?
We can make variables mutable.
let mut x = 1
x = x + 1
Different to immutable because const are known at compile-time, whereas immutables may not be known until run time.
const x = 1
byte (u8?): b'A'
f32, f64