erlangforums

erlangforums

Erlang OTP 28.0 Released

OTP 28.0

Erlang/OTP 28 is a new major release with new features, improvements as well as a few incompatibilities. Some of the new features are highlighted below.

Many thanks to all contributors!

Starting with this release, a source Software Bill of Materials (SBOM) will describe the release on the Github Releases page.
We welcome feedback on the SBOM.

New language features

  • Functionality making it possible for processes to enable reception of priority messages has been introduced in accordance with EEP 76.

  • Comprehensions have been extended with “zip generators” allowing multiple generators to be run in parallel. For example, [A+B || A <- [1,2,3] && B <- [4,5,6]] will produce [5,7,9].

  • Generators in comprehensions can now be strict, meaning that if the generator pattern does not match, an exception will be raised instead of silently ignore the value that didn’t match.

  • It is now possible to use any base for floating point numbers as per EEP 75: Based Floating Point Literals.

Compiler and JIT improvements

  • For certain types of errors, the compiler can now suggest corrections. For example, when attempting to use variable A that is not defined but A0 is, the compiler could emit the following message: variable 'A' is unbound, did you mean 'A0'?

  • The size of an atom in the Erlang source code was limited to 255 bytes in previous releases, meaning that an atom containing only emojis could contain only 63 emojis. While atoms are still only allowed to contain 255 characters, the number of bytes is no longer limited.

  • The warn_deprecated_catch option enables warnings for use of old-style catch expressions on the form catch Expr instead of the modern trycatchend.

  • Provided that the map argument for a maps:put/3 call is known to the compiler to be a map, the compiler will replace such calls with the corresponding update using the map syntax.

  • Some BIFs with side-effects (such as binary_to_atom/1) are optimized in trycatch in the same way as guard BIFs in order to gain performance.

  • The compiler’s alias analysis pass is now both faster and less conservative, allowing optimizations of records and binary construction to be applied in more cases.

ERTS

  • The trace:system/3 function has been added. It has a similar interface as erlang:system_monitor/2 but it also supports trace sessions.

  • os:set_signal/2 now supports setting handlers for the SIGWINCH, SIGCONT, and SIGINFO signals.

  • The two new BIFs erlang:processes_iterator/0 and erlang:process_next/1 make it possible to iterate over the process table in a way that scales better than erlang:processes/0.

Shell and terminal

  • The erl -noshell mode has been updated to have two sub modes called raw and cooked, where cooked is the old default behaviour and raw can be used to bypass the line-editing support of the native terminal. Using raw mode it is possible to read keystrokes as they occur without the user having to press Enter. Also, the raw mode does not echo the typed characters to stdout.

  • The shell now prints a help message explaining how to interrupt a running command when stuck executing a command for longer than 5
    seconds.

STDLIB

  • The join(Binaries, Separator) function that joins a list of binaries has been added to the binary module.

  • By default, sets created by module sets will now be represented as maps.

  • Module re has been updated to use the newer PCRE2 library instead of the PCRE library.

  • There is a new zstd module that does Zstandard compression.

Public_key

  • The ancient ASN.1 modules used in public_key has been replaced with more modern versions, but we have strived to keep the documented Erlang API for the public_key application compatible.

Dialyzer

SSL

  • The data handling for tls-v1.3 has been optimized.

Emacs mode (in the Tools application)

  • The indent-region in Emacs command will now handle multiline strings better.

For more details about new features and potential incompatibilities see the README.


Blog post:

EFS Thread:

First 10 of 10 Posts Switch mode

garrison

garrison

Really excited about priority messages, I suspect it will make some of my database-related work easier in the future (e.g. being able to send “control” messages to processes under load). Erlang has made great progress in this area over the years (JIT, splitting up large messages, etc). Many thanks to the core team!

D4no0

D4no0

Interesting feature, however I can see this becoming a mess to debug.

garrison

garrison

I can see how it could be abused. There was great consternation about this when the proposal was made, from people with far more experience and knowledge than me.

However in my particular case I have a completely closed system where I can be very deliberate about which messages should be priority, so I think it will be helpful.

BartOtten

BartOtten

Yet, I have a pet project that will greatly be simplified due to this new feature. Instead having to rely on an external queue with a few handlers to prepend instead of append it can now be controlled ‘on the fly’. Just what it was made for :slight_smile:

Hermanverschooten

Hermanverschooten

If your project depends on x509 it will currently not work with OTP 28.0, the changes made to the public_key are incompatible and apparentely will take some time to fix, including some changes to OTP.

https://github.com/voltone/x509/issues/86

martin

martin

I think we’ve all been bitten by the bug of “oops, I’m unintentionally filtering out elements!”, so I really appreciate that they’ve added strict generators. Perhaps I appreciate the subtle syntax difference a little less.

I wonder if/how this will show up in Elixir. Adding new syntax isn’t exactly ideal, but this is per generator, so an option to for also doesn’t fit. Has there been discussions elsewhere of how to fit strict generator’s into Elixir’s for comprehensions?

I found a discussion on the elixir-core mailing list from 2021. José doesn’t like the idea of new operators, and there is some discussion of a for! strict comprehension, but that would mean an all-or-nothing approach to strict generators.

I’m not looking for a discussion on how strict generators could be added, but rather asking if anyone knows of plans to adopt this feature from OTP 28 into Elixir.

neilberkman

neilberkman

I wanted to share a compiler bug I discovered in OTP 28.0.1 that might affect others upgrading. The bug causes a compiler crash when compiling certain recursive function patterns, and I encountered it through the diff_match_patch Elixir library.

The Issue:

  • The OTP 28 compiler crashes with bad key error in beam_ssa_pre_codegen
  • Triggered by recursive functions with specific patterns (nested conditionals, pattern matching, intermediate variables)
  • The same code compiles fine on OTP 27

Who’s affected:

  • Anyone using diff_match_patch library
  • Any code with similar recursive patterns (tail recursion + pattern matching + nested case/if)

Details:

Workaround until the fix is released: Stay on OTP 27 for now if you’re using affected dependencies, or wait for the patch to land in an OTP 28 point release.

Hope this saves someone some debugging time. Thanks to the OTP team for the quick fix!

martosaur

martosaur

Great find! diff_match_patch seems to be a great library for testing OTP releases as I remember having compiler issues in OTP 27 too Segmentation fault on OTP27 · Issue #9100 · erlang/otp · GitHub

neilberkman

neilberkman

Full disclosure, this was pretty much all Claude Code. I was pretty sure it was legitimate, but relieved when I got confirmation :sweat_smile:.

f0rest8

f0rest8

Bit late to the party but excited for the zstd module, thank you to everyone for their work

— All posts loaded —

Where Next?

Trending in Erlang News Top

bjorng
We want to introduce a new native datatype to Erlang: native records. Although replacing all tuple records with native records is not our...
New
erlangforums
A new Erlang announcement has been posted: Original announcement:
New
erlangforums
A new Erlang announcement has been posted: Original announcement:
New
erlangforums
A new Erlang announcement has been posted: Original announcement:
New
jhogberg
Patch Package: OTP 29.0.5 Git Tag: OTP-29.0.5 Date: 2026-08-04 Trouble Report Id: OTP-...
New
jhogberg
Patch Package: OTP 28.5.0.5 Git Tag: OTP-28.5.0.5 Date: 2026-08-04 Trouble Report Id: ...
New
jhogberg
Patch Package: OTP 27.3.4.16 Git Tag: OTP-27.3.4.16 Date: 2026-08-04 Trouble Report Id: ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement