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

Devtalk
A new Erlang news item has been posted! Link: Release OTP 24.1.1 · erlang/otp · GitHub
New
Devtalk
A new Erlang news item has been posted! Link: Release OTP 22.3.4.17 · erlang/otp · GitHub Posted via Devtalk.
New
bjorng
The first release candiate of Erlang/OTP 22.0 has been released.
New
Devtalk
A new Erlang news item has been posted! Link: Release OTP 23.2.7.1 · erlang/otp · GitHub Posted via Devtalk.
New
erlangforums
This thread will be used to cross-post official Erlang News via erlangforums.com (and will replace the Devtalk Erlang news cross-poster)....
130 10244 148
New
Devtalk
A new Erlang news item has been posted! Link: Release OTP 23.2.7.3 · erlang/otp · GitHub Posted via Devtalk.
New
Devtalk
A new Erlang news item has been posted! Link: Release OTP 23.2.4 · erlang/otp · GitHub Posted via Devtalk.
New
kennethL
Read the new Blog post by John Högberg at the OTP team. It is a brief primer on BEAM, the virtual machine that executes user code in th...
New
erlangforums
Please provide feedback: Erlang/OTP 26.0-rc1 is the first release candidate of three before the OTP 26.0 release. The intention with ...
New
voltone
Erlang/OTP 23.2.2 is out, fixing a critical TLS certificate verification issue in 23.2 an 23.2.1 allowing MitM attacks and forged client ...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
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

We're in Beta

About us Mission Statement