by elihu · 11y ago · 0 comments
The can't-reuse-field-names thing is annoying, but claiming that it "isn't a serious language" because they made a design choice that doesn't meet your exact expectations seems kind of closed-minded to me.
OCaml is not in that tradition—field projection uses dot notation and has historically not been an ordinary function (although maybe that has changed in later versions).
This avoids those problems.
data F = F { fName :: String }
data P = P { pName :: String }