3 ms·
What do you mean by Haskell's deriving being generic? As far as I know, Haskell can only derive a fixed list of classes, except for newtypes, which are sort of
by comex 12y ago
What do you mean by Haskell's deriving being generic? As far as I know, Haskell can only derive a fixed list of classes, except for newtypes, which are sort of a different case. How the fixed list is implemented in the compiler isn't that important... on the contrary, at least vanilla Rust has a way to define arbitrary deriving-like extensions based on inspecting the structure at compile time (even if it's somewhat ugly), while vanilla Haskell has nothing of the sort.
- coolsunglasses 12y ago>As far as I know, Haskell can only derive a fixed list of classes, That's not true at all, cf. SYB and Generics.