josevalim

josevalim

Creator of Elixir

I hereby officially announce the Elixir type system effort is transitioning from research into development. Read the full-announcement here: Type system updates: moving from research into development - The Elixir programming language

This new exciting development stage is sponsored by Fresha (they are hiring!), Starfish* (they are hiring!), and Dashbit.

Thank you!

13900 164

Showing Posts 1 to 10

tcoopman

tcoopman

Awesome news!

Personally I’m really excited about this. I know it’s super early but I’d love a good type system on top of Elixir.

Eiji

Eiji

I understand the first 2 milestones, but can somebody say what’s a difference between the @spec attribute and 3rd milestone? :thinking:

The third milestone is to introduce the (most likely) $-prefixed type annotations for functions, with no or very limited type reconstruction: users can annotate their code with types, but any untyped parameter will be assumed to be of the dynamic() type. If successful, then we will effectively have introduced a type system into the language.

Can’t Elixir compiler use already existing specs instead of adding yet another annotation? We have any() and term() which should be more than enough as replacement for dynamic(). :question:

Also is adding a type system like in the post means replacing part or even all features of tools like dialyzer by Elixir compiler? If so I hope the compilation would not be longer because of creating plts … :sweat_smile:

LostKobrakai

LostKobrakai

Typespecs as they exist right now don’t cover negations only unions. E.g. there’s no way to have something like any atom, but not :ok.

Cless

Cless

Really happy with the direction the type system is taking so far.

As a wise man once said, my body is ready. It will be glorious (hopefully!).

josevalim

josevalim OP

Creator of Elixir

There are a few details I don’t appreciate about how we implemented typespecs (for example, I find them too verbose) but the deal breaker here is that typespecs are not capable of expressing the proposed type system, so we will need something new.

27
Post #7
zachallaun

zachallaun

This is great to hear. Huge congrats to everyone involved. I’m sure I’m not the only one here eager to see these ideas translated to code. :slight_smile:

I’d like to especially extend congratulations to Guillaume Duboc – not every PhD candidate has the opportunity for their work to make such a direct and significant impact. It must be extremely exciting!

16
Post #8
cevado

cevado

is there any information if the new type system will support literals as types?
one of the limiting factors for me to use dialyzer types is that it only support atoms for specific values when building types.

zachallaun

zachallaun

Edit: I misunderstood the question. I’m not sure that it will support arbitrary literals beyond atoms.

OndrejValenta

OndrejValenta

Sweet Jesus, Halelujah!

Working with Elixir/Phoenix daily, you slowly get used to some level of pain and suffering, typo here, wrong return tuple here, wrong atom elsewhere. You start see it as part of the job.

But then, you switch back to ASP.NET for another project, like we do in my team, and you find out the pain is gone, there is no more suffering, you write more but you can relax, you can trust the system, if it compiles you are good, if it doesn’t it tells you right away where you made a mistake. With ReSharper and continuous compilation I can see all compilation errors right away, after every change.

As much, as I prefer Elixir/Phoenix for production systems and we introduced some into DHL, this is an enormous problem for us, the trust in the code is simply not there.

sergio

sergio

Does this mean that the type system you’re exploring will ultimately replace typespecs entirely?

Where Next? Top

Trending in News Top

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews