New BEAM There, Done That with Louis Pilfold covering Gleam’s design in more depth than I’ve seen elsewhere.
The Erlang-relevant points:
Gleam chose Erlang records as its underlying data structure for compatibility with the BEAM ecosystem. This has costs: no runtime reflection, less information available about data structures than Elixir’s struct system provides. If native Erlang records land and get adopted across OTP versions, Louis is interested - it would solve much of the cross-language interop friction between Gleam, Erlang, and Elixir.
The typed message passing problem. The common objection when Gleam was being built was that typed message passing is impossible on the BEAM. Gleam’s answer: put the concurrency model in a library rather than the language, and type it there. This also means the model can evolve - if structured concurrency ideas prove valuable, a library can adopt them where a language primitive can’t.
The conditional compilation syntax is the design decision Louis most regrets. It’s in the language now and can’t easily be removed. He explicitly hopes fewer people discover it exists. This is a useful example of why language design decisions carry longer consequences than most software design decisions.
tour.gleam.run: the full Gleam compiler compiled to Wasm, running in the browser, covering the entire language in an afternoon.