Conversation

I now I've come across this in the discourse on type class constraints, but I can't for the life of me remember what to search for to brush up. You'll have to elaborate to explain why this is such a problem.
1
Yup, seen that one before. I believe he just goes though why it's hard to build an efficient set implementation, but doesn't elaborate on alternatives. Like using module functors or parametrising the type by the dictionary. Will have to watch again.
1
The set thing is just the motivating example (it's to do with a union operation IIRC). The main point is that it's not possible to do that without coherent type classes! The conclusion is that everything else is inferior :)
1
If your functors are generative then you can't union two sets of ints from two different libraries unless they both defer choice of set implementation by making it a parameter, leaking internals. If they are applicative then you need to decide equality of comparison functions.
1
2
If you simply tag your data type with which instance you mean then you lose access to common data types. e.g. Compose and (,) dont hold a tag, so now I have to have hundreds of pairs of compositions depending on the attributes of their contents. This damages code reuse badly.
2
Rebuilding drastically changes the asymptotic performance of these operations, and you also have to worry whether or not the orderings obey structural equality. You can't even merge the smaller into the larger, but rather must always merge with a given bias for even worse O(...)!