Operators
Arithmetic
Section titled “Arithmetic”let a = 10 + 2let b = 10 - 2let c = 10 * 2let d = 10 / 2let e = 10 % 3Comparison
Section titled “Comparison”let eq = 10 == 10let ne = 10 != 20let lt = 10 < 20let ge = 20 >= 10Logical
Section titled “Logical”let ok = true && !falselet either = false || trueAssignment
Section titled “Assignment”let mut score = 0score += 5score -= 2score *= 3Type Operators
Section titled “Type Operators”let wide: i64 = 42let small: i32 = wide as i32
let token: (i32, bool) = (7, true)if token[0] is i32 { println("ok")}Use as for explicit casts and is for type-pattern checks with unions/interfaces.