Bringing Types to Elixir by Giuseppe Castagna and Guillaume Duboc | ElixirConf EU 2023

Channel:Code Sync · Length:40:15 · Published:2023-10-23 · Views:7049

Watch on YouTube

Summary

ElixirConf EU 2023 talk by Giuseppe Castagna and Guillaume Duboc on bringing set-theoretic types to Elixir, and the benefits such a type system could offer such as catching bugs.

Why HN recommends it

Linked as the authoritative background on how Elixir's gradual set-theoretic type system works.

watch the video presentation by the author[1] — HN, 2023

Programming language design · Functional programming

Subtitles (excerpt)

[Music] thank you [Applause] so hello everyone um I'm very happy to present you the outcomes of my PhD program conducted under this provision of type systems expert Jose pekastania and the renowned Joseph Lim this project was initiated two years ago during mail exchanges between Jose and Giuseppe when they decided to bring on a PhD candidate to help realize their IDs and now after one year and a half of work I'm super excited to present you the type system that we've designed for elixir this presentation its goal would be to Showcase its capabilities and the ways it can enhance the Alexi developer experience so let's dive in and first discuss why types so as you know Elixir already adds us types in fact you can write a function that checks the type of its entity of its input but this manipulation only occurs during runtime which is why we talk of a dynamically typed function it is also possible to write type specs but Elixir uses those mostly for documentation and although it is possible to pass them to external tools to provide a code analysis elix elixit itself does not make large use of it and this is precisely what we want to do we want to introduce a system of types that will be used before running new programs before

On Hacker News

Short answer: “a type system centered on the use of set-theoretic types (unions, intersections, negations) that satisfy the commutativity and distributivity properties of the corresponding set-theoretic operations”. Long answer, well, there are blog posts[0], the Design Principles of the Elixir Type System paper[1] and related presentations[2, 3, 4] that talk about it at length. Giuseppe Castagna… — mechanicum, 2026-06
> The hottest news in the Elixir community is that it is currently experimenting with set theoretic type / gradual typing. Some french PHD is working on it To expand on it: you can read the proposal[0] or watch the video presentation by the author[1]. It is a very similar system to Typescript, with (at the first glance) only minor differences: "any" becomes "term", primitive constants are not sin… — pzmarzly, 2023-11
We were 100% not expecting this to show up on HN front page. :) In any case, the title is accurate in that it is only a prototype and it was built by Guillaume to explore how Elixir idioms map to set-theoretic types. The UX and syntax do not reflect how the type system would look in Elixir itself (if we get a type system at all). You can find more context in Guillaume’s talk: [VIDEO] The initial … — josevalim, 2023-06

Related videos