2 ms·
The syntax for "record types" - elements of named tuples - is really awkward and pollute namespace. I.e., if I want a module in my app to have two different ty
by PeterisP 13y ago
The syntax for "record types" - elements of named tuples - is really awkward and pollute namespace.
I.e., if I want a module in my app to have two different types containing an element 'customerID' that I'd like to refer by name in that context, then it's a bit painful - and it is a really common need if I need to quickly make a mostly-CRUD webapp, for which otherwise Haskell/Yesod would be as practical as Ruby/Rails.
- carterschonwald 13y agoThere are a few different solutions to the record name space problem that are due to land in the next year. And already some decent lens based solutions too.
- Fixnum 13y agoIt's being fixed. http://www.reddit.com/r/haskell/comments/1rpte3/explanation_of_the_new_haskell_records_extension/ http://www.reddit.com/r/haskell/comments/1rpte3/explanation_...