|
|
|
|
|
by bjz_
2857 days ago
|
|
> No, I mean that neither Elm nor Standard ML has nor needs typeclasses. No language needs typeclasses. Standard ML has less need for type classes because it has a much more expressive module system, but it still can be extremely tedious to pass around module definitions all the time, which is why they added equality types when the language was originally designed. This is considered an ugly hack though, even by its own creators [0]. Definitely agree that folks should aim for better than type classes, especially due to complications around global instance coherence. One nice solution is modular implicits/instance arguments [1][2]. Tricky thing is to do it without adding too much complexity to the language. I do wish that there would just be some acknowledgment that it's a hard, but real problem to solve for Elm's point in the design space, rather than just pretending it isn't there. It's ok just to say that you're not spending design capital on it at the moment due to more pressing issues! [0]: https://github.com/SMLFamily/Successor-ML/issues/18 [1]: https://arxiv.org/abs/1512.01895 [2]: https://www.researchgate.net/profile/Dominique_Devriese/publ... |
|