3 ms·
This example with the absence of an Eq class is not related to just equality, it’s a symptom of a lack of generics. You’ll end up with a lot of special, built-i
by runeks 9y ago
This example with the absence of an Eq class is not related to just equality, it’s a symptom of a lack of generics. You’ll end up with a lot of special, built-in classes (e.g. Ord), while just adding simple type classes to Elm would make all of this solvable in a library (e.g. Elm’s Prelude).
Surely, if we agree that Eq, Ord, and Foldable are useful, they’re probably not the only useful type classes in existence.
- willtim 9y agoI think the Elm folks are playing a waiting game. There are alternatives to type-classes such as the proposed modular implicits for OCaml.