3 ms·
F# has anonymous records, which are great, but I definitely wouldn't want them to be the default.
by munchler 5y ago
F# has anonymous records, which are great, but I definitely wouldn't want them to be the default.
- grumpyprole 5y agoThe F# ones are tacked-on and have awkward syntax, but otherwise, why not? As I said, anonymous records could permit named arguments for free, e.g. let foo {x, y} = x + y in foo {x=1, y=2} The function "foo" above has type: { x:int, y:int } -> int Again, a nominal type can always easily be created from a structural type.