Gleam v1.19.0 changes the Erlang backend from emitting Erlang source to emitting Erlang abstract forms - the parser-produced intermediate representation encoded in the Erlang external term format. Emitting abstract forms lets Gleam skip the front-end of the Erlang compiler, improving compile performance and making runtime location metadata map precisely to original Gleam source (so BEAM crash reports and stack traces show correct Gleam line numbers). Benchmarks using a 100-module/100-function test show a marked speedup versus v1.17.0, and the team explains why generating BEAM bytecode directly was rejected: bytecode evolves, requires constant maintenance and reimplementing decades of Erlang optimisations, and is not cost-effective for a community-funded project. The approach follows Elixir’s precedent and raises compiler code-quality by replacing an old generator with a cleaner design.
The release also ships several practical JVM/JS and tooling improvements. JavaScript compilation flattens pattern-match decision trees into single-condition checks, reducing branches and intermediate variables; short Gleam list literals now compile to direct prepend chains instead of building arrays and converting them, improving runtime for many cases. TypeScript declaration generation gains overloads to preserve type information for variant-checking helpers. Build-tool integration improvements include automatic .app file generation, a compile-package --no-dev flag, and export commands that can write to stdout or files, easing use from Mix/rebar3. Key contributors named include Giacomo Cavalieri, John Downey and Rodrigo Álvarez.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.