|
|
|
|
|
by mrkgnao
3098 days ago
|
|
How does record access work? Is it via generated record accessor functions (pretty crappy, used by Haskell) or does OCaml now have true row types (as in PureScript (and perhaps Elm))? Can you have multiple types with the same record field name? |
|
For example:
(Of course this is an extreme example, good code should be clearer than that :p)When a field "foo" comes from a type t in a module M (M.t), you can either use type disambiguation as above or qualify accesses : x.M.foo. All this also works with ADTs.