Conversation

This Tweet was deleted by the Tweet author. Learn more
Bottom line: I don't know what the best thing is yet. But Haskell is quite painful in many ways, so I choose to believe that there is some better option out there waiting to be found. :) I haven't heard any arguments against named instances, but would love to hear some.
2
4
By named instances do you mean non-coherent instances? Ed Kmett did a loong talk "Type Classes vs. The World" which outlined some of the problems. I don't necessarily agree - I'm interested in exploring the modular type classes approach, but it brings up important points.
1
1
You definitely want to avoid Scala's situation where you never are sure what instance you have in scope at any time - and the instance resolution algorithm is mysterious and confusing.
1
1
Type classes can be used in the way they do because they violate modularity, assuming global coherence across packages. But once you remove, and perhaps even encourage people to break global coherence, you need to have a way to get back what you traded away.
2
1
Show replies