Is Gleam what I'm looking for?
Let me start saying that I don't believe on perfect languages. But I quite think that Gleam may be what I was looking for for quite some time. But I'm confused with it's position on the Beam ecosystem.
I do program a lot in Go, and I do value the simplicity of the language, but at the same time the type system is so damn simplistic, to a point I can't program on it anymore. The issue is, a better type system becomes way too complicated as it tries, but it's not required, to add all features under the sun. For example, I was working with Scala using Cats on a previous job, and oh my God, indeed, very powerful, but the complexity is just unbearable.
From my experience this is what makes a good language to me:
- Simplicity. This is so subjective, but think on this like: can I learn the language in a weekend or does it take a full year? Go x Haskell
- Compiled
- Errors as values
- Async by default and without function coloring
- ADT
- Immutability
- Good visibility control of fields, structs, functions, and packages
- No nulls and rely on Option/Result types
I think Gleam checks all of this, right? Just the compilation that is not there, but I could live without it by having everything else.
The question now in my head is, why Gleam when Elixir is getting a type system? I did program a little in Elixir, I find it amazing, but being dynamic was such a deal breaker for me. I was very excited to know that José was working on a type system, but I still don't understand to which degree it will extend. From what I was able to read, and understand, it will fill kind of progressive typing and it will not be as strong as Gleam is right now.
Right now I'm working with Rust, despite it's complexity, but dealing with all those lifetimes/borrowing is something that I really don't like. I'm not building a billion requests per second service.