Consistent optional label args syntax

Rescript 10 introduced optional record fields

type person = {
  age: int,
  name?: string
}

that syntax was borrowed from typescript/kotlin

that makes the optional labeled argument syntax inconsistent

let drawCircle: (~color: color, ~radius: int=?) => unit

would be consistent as

let drawCircle: (~color: color, ~radius?: int) => unit
7 Likes