news.volyx.in

Elixir 1.17 released: set-theoretic types in patterns, durations, OTP 27 (elixir-lang.org)

495 points by clessg · 792 days ago · 163 comments on HN

Article summary

Elixir 1.17 has been released, introducing set-theoretic types into the language, which will help developers find bugs earlier and give more confidence when refactoring code. The release also adds support for Erlang/OTP 27 and a new calendar-related data type called Duration. The type system is still in its early stages, but it already provides benefits to developers in the form of new warnings for common mistakes. The development of the type system was made possible through a partnership between CNRS and Remote, and is sponsored by several companies.

Main themes

  • Elixir 1.17 release
  • Set-theoretic types
  • Erlang/OTP 27 support
  • Type system development
  • Language evolution
  • Editor integration

What commenters say

  • The new type system in Elixir 1.17 is a significant improvement, but its effectiveness in large-scale projects is still unknown.
  • The Elixir type system is similar to TypeScript's, but with a different approach to dynamic and gradual typing, and a focus on soundness.
  • The lack of a first-party, polished IDE for Elixir is a major drawback, and the current LSP implementations are incomplete and duplicative.
  • The set-theoretic type system in Elixir is based on semantic subtyping, which provides a foundation for the type system and allows for more precise type checking.
  • The development of the type system is a gradual process, and the current release is just the first step towards a more comprehensive and robust type system.
  • The choice between soundness and expressivity in type systems is a trade-off, and Elixir's approach prioritizes soundness without compromising expressivity.
  • The comparison between Elixir's type system and TypeScript's is not entirely accurate, as they have different design goals and approaches to typing.
  • The introduction of set-theoretic types in Elixir has the potential to improve the overall development experience and reduce errors, but its impact will depend on how it is adopted and used by developers.