Urgent.News

What's breaking now, across thousands of outlets.

Tech

Gleam doesn't compile to Erlang source anymore

Gleam, a type-safe and scalable language for Erlang virtual machine and JavaScript runtimes, recently released version 1.19.0. The update brings significant changes to the Erlang code generator, which has seen a complete redesign and now outputs a different format. Instead of generating Erlang source code, it now produces Erlang abstract forms, an intermediate representation used by the Erlang compiler.

This change has led to several benefits, including improved compiler performance, accurate line numbers in crash reports and stacktraces, and enhanced code-quality. The benefits are also evident when comparing the compilation times of Gleam with other popular programming languages. The new Erlang code generator has shown a considerable improvement in building the benchmark project, with lower compilation times.

When compiling to JavaScript, Gleam's compilation remains fast. While the idea of bypassing the Erlang compiler entirely and generating BEAM bytecode for improved performance is intriguing, it's unlikely due to the dynamic nature of BEAM bytecode and the significant effort required to keep up with its evolution. Gleam's compilation to Erlang abstract forms represents a cost-benefit sweet-spot, providing a reliable foundation for software development.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Every outlet that reported this, and when →

Read the original at gleam.run →

More in Tech

More from Tuesday 6 October →