Values & Types
Lux has a strong, static type system. The compiler catches type errors before your code runs.
Lux has four basic types:
Basic Types
Int- Integers:42,-7,0Float- Decimals:3.14,-0.5String- Text:"hello"Bool- Boolean:true,false
Use let to create variables. Lux infers types, but you can add annotations:
let x = 42 // Int (inferred)
let y: Float = 3.14 // Float (explicit)
Variables are immutable by default. Once set, they cannot be changed. This makes code easier to reason about.