News for hackers. Stuff that matters.
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by bhaney on Wednesday June 12, 2024 @07:50AM (#40656998)
I'm excited about the type system so far, but I'm especially excited to hear about what else the type system is going to enable in the future. I remember José describing this as a "gradual gradual type system," where the gradual type system is going to be gradually added in stages, with this being the first stage. Any cool new type-system-related stuff coming up in the next few stages? I'm especially hoping for newly enabled compiler optimizations.
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by neillyons on Wednesday June 12, 2024 @08:13AM (#40657183)
Here is the roadmap https://hexdocs.pm/elixir/main/gradual-set-theoretic-types.h...

The next milestone will include a mechanism for defining typed structs.

Re:Elixir 1.17 released: set-theoretic types in patterns, du... by pawelduda on Wednesday June 12, 2024 @08:14AM (#40657192)
Doesn't gradual type system mean something else here? As in developers being able to iteratively add types while leaving untyped parts for later? At least this is how Ruby's Sorbet describes it
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by mhanberg on Wednesday June 12, 2024 @08:15AM (#40657204)
Correct, a gradual type system is a form of type system and not the method for rolling it out.
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by arrowsmith on Wednesday June 12, 2024 @09:53AM (#40658174)
It's a gradual type system that they're rolling out gradually.
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by pjam on Wednesday June 12, 2024 @08:24AM (#40657274)
Yes, but the discussion here was about it being a gradual, gradual type system, as in, the gradual type system being added gradually
Re:Elixir 1.17 released: set-theoretic types in patterns, du... by dub_gui on Wednesday June 12, 2024 @12:12PM (#40659732)
You’re right about what a gradual type system means! A gradual type system allows flexibility in how you approach typing a codebase. It also means that your system incorporates a dynamic type, making your types 'gradual'.

Interestingly, gradual set-theoretic types are flexible enough to let you gradually implement type inference for that system. Hence, the gradual gradual type system. :-)