Variables keyword
let
Immutable binding — equivalent to Java final.
Use let for locals and fields that must not be reassigned after initialization. The compiler emits final in generated Java and rejects assignments to let bindings.
Affogato
example.aff
let name = "espresso"
let max: int = 100
class Config {
let version: String = "1.0"
} Generated Java
Example.java
final String name = "espresso";
final int max = 100;
class Config {
public final String version = "1.0";
} Related
var— Mutable binding for locals and fields.name: Type— Type-after-name declaration syntax for parameters, locals, and fields.