/// This can be working with the latest version struct Point { x: Int, y: Int, } let ps: Array = [ Point(0, 0), Point(1, 2), Point(2, 3), Point { y = 3, x = 1, }, ]; enum Z { Z1, // Z is this, Z2, // xor this. } // Blocks ({}) make a scope. let your_name = { let first_name = "Hoge"; let family_name = "Fuga"; first_name + " " + family_name }; // Of cource You can declar new struct and enum in {}. let records = { struct UserRecord { id: Int, name: String = "Anonymous", // set default value region: Region = Region::Unknown, } enum Region { Unknown, East, West, } // These struct and enum can be used only in this {scope}. [ UserRecord(1, "Taro", Region::East), UserRecord { id = 2, name = "Alan", region = Region::West, }, UserRecord { id = 3, name = "Bob" }, UserRecord { id = 4, region = Region::East }, ] }; // Numbers let z: Nat = 0; // You can overwrite var names let z = Z::Z2; // Enum Variant // Option<_> types can represent "null-able" values. let some_value: Option = Some("Name"); // Not Null let null_value: Option = None; // Null. // Exporting this {{ env = {{ shell = $SHELL, // this is a String HOGE = ${HOGE:-fuga}, // with default value "fuga" NUM = ${NUM:-42} as Int, // String -> Int cast BETA = ${BETA:-0.01} as Float, }}, points = ps, z = z, user_name = your_name, records = records, options = {{ some_value = some_value, null_value = null_value, }}, }}