1. 8
  1.  

  2. 3
    map : (a -> b) -> List a -> List b
    map : (a -> b) -> Array a -> Array b
    map : (a -> b) -> Set a -> Set b
    

    Bifurcating the same interface over and over and over for every possible datatype isn’t a sustainable practice, it cries out for the ability to abstract over this interface instead of repeating yourself. OCaml, Haskell, Purescript and Scala all have well documented answers for how to do this. Insist on better type systems in 2016.

    1. 1

      Here is the Elm GitHub issue about type system extensions. It seems that the author plans to fix that interface duplication at some point, but there are multiple possible features that could do so. He writes:

      Right now things are in a wait and see phase. The idea is that through building more stuff, it will become clearer which idea works best for how people use Elm in practice.