by sdfsfsf3kjdf · 5y ago · 0 comments
Elm has generics.
No. That would be fixed by having something akin to typeclasses, traits or interfaces.
Elm's List, Maybe and Array are all defined using a generic type parameter.
BTW, one doesn't have to chose between them in Go either, but only because there are under-the-hood generics for the native types, that are only accessible to the language designers.
https://en.wikipedia.org/wiki/Parametric_polymorphism