bjorng

bjorng

Erlang Core Team

EEP 79: Introducing a new native datatype to Erlang: Native Records

We want to introduce a new native datatype to Erlang: native records. Although replacing all tuple records with native records is not our design goal, we hope to make it simple to upgrade most tuple records to native records. That is why native records use the same syntax as the existing tuple records except in declaration.

Here is the pull request for the EEP.

Our plan is to include native records in RC1 of OTP 29. In the later RCs of OTP 29, we will add support for native records to more applications, like syntax tools and Dialyzer. By OTP 30, we will add performance improvements and broader support for tools, as described in the EEP.


Original announcement:

First 5 of 5 Posts Switch mode

lpil

lpil

Creator of Gleam

I wonder how the ecosystem will change once we have this. Would existing Erlang modules add support for records, or would we have to switch between records, maps, and tuples depending on what function we are using?

I wonder how it’ll work with Elixir’s structs too.

Everyone using the same data structure could be really valuable, hopefully it unifies us all somewhat.

nulltree

nulltree

Wishful thinking, but using Ash directly from Lustre w/o a JSON bridge would be awesome - as far as I understand, currently there is exactly this mismatch between essentially maps/structs in Elixir and records in Gleam that make this prohibitively difficult.

zachdaniel

zachdaniel

Creator of Ash

This very much. Gleam is a really pleasant language to use but I can’t build Ash in gleam using the same patterns and I can’t use Ash from gleam w/o a runtime translation cost so I’m kind of just waiting until that’s possible at that point.

abrookewood

abrookewood

So I wasn’t really sure what all that meant, but have found the details here:

https://github.com/bjorng/eep/blob/bjorn/native-records/eeps/eep-0079.md

Looks like the key feature is in that last line “more fields can be added to the definition without having to recompile all code that uses the record”.

AstonJ

AstonJ

Cross posting from EFS - @bjorng’s talk from Code BEAM Lite:

— 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 & 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
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement