
10 Jan
2008
10 Jan
'08
1:10 p.m.
2008/1/10, Lutz Donnerhacke
* Michael Roth wrote:
Exists there a way to write this cleaner without writing countless "set_xyz" helper functions?
The syntactic sugar for record modifications is simply that: sugar. You might write your own modifier functions: set_bla x y = x { bla = y }
That seems to be exactly what Michael search to avoid. And I don't see any way to do that with the haskell records. Some extension of records may have first-class label though. A pretty interesting alternative could be HList, it has first-class label and a bunch of other good stuff. I never used it though, so I don't know how it affects the performances, if someone could give his experience with it ? -- Jedaï