Records in Haskell
b.hilken at ntlworld.com
Fri Sep 16 13:47:25 CEST 2011
I have added my proposal to the wiki.The only downsides to it that I can see are:
1. If the types can be resolved at compile time, the compiler needs to optimise away the dictionaries, otherwise there will be a performance cost. Since this is always the case for type classes, I assume this is a well-studied problem.
2. The olegites are going to use the Label mechanism for other things, and ask for extra features. What features would be worth implementing? Do we want a member function to return the name as a string? How about a lexicographic ordering type function so we can implement extensible records? Where do we stop?
More information about the Glasgow-haskell-users