3 ms·
Just for the record, orphan instances, although possible in Haskell, are regarded as a big problem and something that should be avoided as much as possible. The
by moomin 6y ago
Just for the record, orphan instances, although possible in Haskell, are regarded as a big problem and something that should be avoided as much as possible. The problem being, you can declare an orphan instance yourself, later discover you need another library, only to discover it implements the orphan instance as well, preventing compilation. Worst case scenario is that the two implementations are semantically different and you no longer have any idea what your code should do.
(Orphan instances in apps are horrible, orphan instances in libraries run the risk of making your whole library unusable.)
As useful as they sometimes are, I can't help feeling Rust made the right call here.