Gleam doesn't compile to Erlang source anymore(gleam.run)
315 points by ingve 8 days ago | 136 comments
tl;dr: Gleam v1.19.0 now compiles to Erlang abstract forms (a binary intermediate representation) instead of Erlang source code, bypassing the front-half of the Erlang compiler for significantly faster build times and accurate stack traces mapped to Gleam source. The team opted against targeting BEAM bytecode directly due to its unstable nature across VM versions, following the same approach as Elixir. The release also includes JavaScript codegen optimizations for pattern matching and list literals, better TypeScript interop, and language server improvements.
HN Discussion:
  • ↑Technical explanation and context about Erlang abstract forms supporting the design choice
  • ↑General enthusiasm and praise for Gleam as a language and ecosystem
  • ~Desire for Gleam to expand beyond BEAM/JS to native compilation targets
  • ↓Concern that the article's title is misleading about Erlang compatibility
  • •Questioning why the Gleam team didn't take this approach originally