# Set Theoretic Types in Elixir with José Valim Page: https://stenobird.com/podcast/elixir-wizards/set-theoretic-types-in-elixir-with-jos-valim Text version: https://stenobird.com/podcast/elixir-wizards/set-theoretic-types-in-elixir-with-jos-valim.md Podcast: [Elixir Wizards](https://stenobird.com/podcast/elixir-wizards) Published: 2025-07-10T10:30:00+00:00 Episode link: https://smartlogic.fireside.fm/s14-e07-set-theoretic-types-elixir-jose-valim Audio file: https://aphid.fireside.fm/d/1437767933/03a50f66-dc5e-4da4-ab6e-31895b6d4c9e/2f60d0c5-cf49-484b-bdbc-5dd2cf3c3a55.mp3 Processing state: processed JSON: https://stenobird.com/v1/public/podcasts/elixir-wizards/episodes/set-theoretic-types-in-elixir-with-jos-valim Duration seconds: 2740 ## Resource José Valim discusses the implementation of a set-theoretic type system for Elixir that uses compiler-driven inference without requiring manual annotations. The discussion covers the phased rollout strategy, performance optimizations for large codebases, and the future of type-driven development in the ecosystem. ## Highlights - Main idea: Elixir is adopting a set-theoretic type system that leverages full inference to minimize developer friction - Practical takeaway: The rollout is phased (v1.19/v1.20) to ensure backward compatibility and avoid breaking existing dynamic code - Failure mode: Avoid treating new type warnings as bugs to be ignored; they often highlight underlying precision issues in the language's type flow - Performance insight: Recent optimizations have significantly reduced compilation overhead, with some large codebases seeing much faster build times - Future vision: Upcoming features include support for guard-clause typing and enhanced LSP diagnostics for better developer tooling ## Topics Elixir, Type Systems, Compiler Inference, Software Engineering, Programming Language Design, Performance Profiling, LSP, José Valim ## Chapters - 1:00 — Recent Developments: José Valim shares updates on his recent work, including his focus on the Elixir type system and AI-related projects like Tide Wave. - 4:30 — The Shift to Set-Theoretic Types: A look back at the decision to move away from a traditional type system toward a set-theoretic approach after initial research hurdles. - 7:45 — Handling Dynamic Code: Discussion on how the type system manages code it cannot fully understand by falling back to dynamic types. - 14:55 — Challenges with Behaviors: An exploration of the complexities involved in implementing type checking for Elixir behaviors. - 18:20 — Type Inference in Action: A technical breakdown of how the compiler tracks types through functions, such as integer and float transformations. - 21:35 — Developer Impact and Tooling: How the new type system affects current workflows and the role of Dialyzer during this transition. - 25:05 — The 'Draw the Owl' Phase: José explains the iterative process of refining type precision as more information flows through the compiler. - 35:20 — LSP and Diagnostics: How the Language Server Protocol utilizes compiler diagnostics to provide real-time feedback to developers. ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/elixir-wizards/episodes/set-theoretic-types-in-elixir-with-jos-valim/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/elixir-wizards/set-theoretic-types-in-elixir-with-jos-valim.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.