That’s quite a simple proposal. Not necessarily a good one. This:
module Path1 = Path ~x:1 ~y:2 ~color:"red"
Will get translated to
module Path1 = Path (
struct
let x = 1
let y = 2
let color = "red"
end )
My motivation for wanting it is to be able to later open Path1 do stuff without explicitly mentioning
x, y, or color
Path1.(
line_to 80 20;
arc_to 20 30 50;
(* and so on *)
)
The above is not a real example, btw