Tin

Examples · learn/05-structs · 109 of 339

shorthand

examples/learn/05-structs/shorthand.tintin run examples/learn/05-structs/shorthand.tin
type Point = { x: int, y: int }

fn main() {
  let x = 3
  let y = 4
  let p = Point { x, y }          // same as Point { x: x, y: y }
  print(p)
}