4 ms·
In my experience it was a perpetual pain point. Do you namespace all your field names with a common prefix based on the outer type name? Or do you just get lu
by evmar 14y ago
In my experience it was a perpetual pain point. Do you namespace all your field names with a common prefix based on the outer type name? Or do you just get lucky and not have the names collide?
- hesselink 14y agoIn the past most people prefixed their field names with the type name. Nowadays, the most common thing is to put types in their own module, and use the module system to sort out any conflict. Qualified imports can add a prefix, but you can also import parts unqualified, or hide one problematic field.
- mifrai 14y agoWhile I prefer the module solution, it's not always possible when you have mutually recursive record definitions. Well, technically it is possible - but it's very unpleasant [1]. [1] http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#mutual-recursion http://www.haskell.org/ghc/docs/latest/html/users_guide/sepa...