Hasty Briefsbeta

Bilingual

Gleam doesn't compile to Erlang source anymore

5 hours ago
  • Gleam v1.19.0 introduces a new code generator that outputs Erlang abstract forms instead of source code, improving build performance, providing accurate line numbers in stacktraces, and enhancing code quality.
  • The new generator eliminates the 'transpiler' label by using binary format directly, and benchmarks show a significant reduction in compilation time.
  • Gleam chose not to target BEAM bytecode directly due to maintenance costs and resource constraints, following Elixir's approach.
  • JavaScript compilation receives optimizations: flatter decision trees from pattern matching and direct list construction for short lists, boosting performance.
  • TypeScript declarations now include overloads to preserve type information when checking custom type variants.
  • Build tool support is improved with automatic .app file generation, a --no-dev flag, and stdout output options for easier integration with Mix and rebar3.
  • Language server gains full label support (go-to-definition, find-references, renaming), and a new format_source function enables code formatting in the browser via WebAssembly.
  • Error messages are enhanced for common mistakes like merge conflict markers, invalid record update syntax, and non-existent operators.
  • The project is community-supported and calls for sponsors to sustain development.