Get the latest tech news
Gleam Is Pragmatic
I’ve spent the past several years working with functional programming languages in my free time – primarily Haskell and OCaml. I love both languages but also find aspects of each frustrating. Haskell is terse and elegant with type classes providing a powerful mechanism for ad-hoc polymorphism. However, it can also be confusingly implicit and I personally find lazy evaluation to have more downsides than upsides. OCaml is explicit and powerful with a best-in-class module system. However, I believe it is often exhaustingly explicit, especially when dealing with custom data types in generic containers.
I’ve spent the past several years working with functional programming languages in my free time – primarily Haskell and OCaml. This example has a bunch of the good features from Haskell and OCaml – generic collections “just work”, it’s obvious what functions are being called, and string conversion is convenient via string.inspect. When we want a custom type to be the key of a Map, we must manually implement the compare function (as noted earlier, I’m sticking to standard libraries, so no ppx_deriving).
Or read this on Hacker News