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:

Most Liked

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.

Where Next?

Popular in Erlang News Top

hauleth
http://erlang.org/download/OTP-22.0.README
New
Devtalk
A new Erlang news item has been posted! Link: Release OTP-22.3.4.12.1 · erlang/otp · GitHub Posted via Devtalk.
New
Devtalk
A new Erlang news item has been posted! Link: Release OTP 23.3.4.3 · erlang/otp · GitHub Posted via Devtalk.
New
Devtalk
A new Erlang news item has been posted! Get the full details here: Decentralized ETS Counters for Better Scalability - Erlang/OTP P...
New
Devtalk
A new Erlang news item has been posted! Posted via Devtalk.
New
Devtalk
A new Erlang news item has been posted! Get the full details here: The Many-to-One Parallel Signal Sending Optimization - Erlang/OTP
New
garazdawi
Patch Package: OTP 28.0.1 Git Tag: OTP-28.0.1 Date: 2025-06-16 Trouble Report Id: OTP-...
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

Other popular topics Top

josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54120 245
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement