José Valim, the creator of Elixir, discusses the progress made in adding gradual typing to Elixir. The hosts explore the benefits and challenges of introducing a type system in Elixir and the long-term relevance of the language. They also touch on AI in Elixir programming, community engagement, and future development.
The development of the type system in Elixir aims to catch bugs early and provide contracts between different parts of the codebase.
The type system in Elixir is being implemented gradually, starting with patterns and guards, and aims to improve software correctness.
The gradual typing approach in Elixir allows for flexibility while maintaining the language's needs.
Building a strong community and effective marketing are crucial factors for the relevance and longevity of a programming language.
Deep dives
The Origins of the Type System
The development of the type system in Elixir started when Jose failed to implement a type system himself and received a research paper from a student in Uruguay. He reached out to Giuseppe Castaya and began collaborating to develop a type system for Elixir. Several companies sponsored the work, and a PhD student named Guillaume joined the team. The goal was to create a gradually typed language that wouldn't require major changes to the existing Elixir syntax and semantics.
The Features and Progress of the Type System
The type system in Elixir aims to provide contracts between different parts of the codebase and catch bugs early. It is being implemented step by step, starting with patterns and guards. The initial milestone focuses on finding obvious bugs without requiring users to write type signatures. The upcoming release, 1.17, will also introduce warnings for pattern matching on structs with non-existent fields. The team is working on the proper representation and typing rules for each construct in the language and is researching new approaches to gradually typing.
The Benefits and Future of the Type System
The type system in Elixir is expected to find more bugs and improve software correctness. It aims to provide faster feedback and better error messages to developers. While there are trade-offs in implementing a type system, such as runtime costs and potential limitations, the team is committed to finding the right balance. The gradual typing approach allows Elixir to maintain its flexibility and match the needs of the language. The current research will continue for a few more years, and it is hoped that the type system will eventually become a valuable tool in the Elixir ecosystem.
The Path Ahead and Jose's Future Involvement
The development of the type system is an ongoing journey, and the team is intentionally taking their time to ensure a strong and well-thought-out implementation. They are open to new discoveries and potential improvements as they collaborate with academic researchers and explore new theories. Jose sees himself as replaceable and hopes to eventually hand off the type system work to others. While he has considered other projects and directions in the past, his enthusiasm for Elixir and the type system keeps him engaged and excited for what lies ahead.
The importance of community and marketing
The speaker emphasizes that the relevance of a programming language is not primarily dependent on technological factors, but rather on building a strong community and effective marketing. While a technology's initial appeal may attract attention, it is the sustained excitement within the community and the way they interact with one another that ultimately determines the language's longevity and usefulness.
The challenge of AI in Elixir programming
The discussion revolves around the limitations of current AI models, such as GPT, in assisting with Elixir programming. The speaker acknowledges that AI tools like chat GPT are not yet proficient in generating Elixir code or providing accurate suggestions. They contemplate the need for better embeddings and increased availability of Elixir documentation to improve AI's understanding of the language. They also express concern about the risk of closed-source AI becoming dominant and hindering the growth of smaller programming communities.
The role of open source and the future outlook
Despite the uncertainty surrounding AI and technological shifts, the speaker remains optimistic about Elixir's future. They highlight the importance of open-source collaboration and the need for continued investment in tooling to enhance the developer experience. The focus is on maintaining a strong community, prioritizing open-source AI tools, and ensuring that programming languages can adapt to changing needs and challenges.
Our old friend José Valim & his team have been hard at work adding gradual typing to Elixir. They’re only 1-3% of the way there, but a lot of progress has been made. So, we invited him back on the show for a deep-dive on why, how & when Elixir will be gradually typed.
Changelog++ members save 5 minutes on this episode because they made the ads disappear. Join today!
Sponsors:
Vercel – With zero configuration for over 35 frameworks, Vercel’s Frontend Cloud makes it easy for any team to deploy their apps. Today, you can get a 14-day free trial of Vercel Pro, or get a customized Enterprise demo from their team. Visit vercel.com/changelogpod to get started.
Read Write Own – Read, Write, Own: Building the Next Era of the Internet—a new book from entrepreneur and investor Chris Dixon—explores one possible solution to the internet’s authenticity problem: Blockchains. From AI that tracks its source material to generative programs that compensate—rather than cannibalize—creators. It’s a call to action for a more open, transparent, and democratic internet. One that opens the black box of AI, tracks the origins we see online, and much more. Order your copy of Read, Write, Own today at readwriteown.com