(no title)
jonnycat | 1 year ago
Again, I definitely trust them to get it right in the long term, but in the meantime, the progress has been a bit confusing to me.
jonnycat | 1 year ago
Again, I definitely trust them to get it right in the long term, but in the meantime, the progress has been a bit confusing to me.
josevalim|1 year ago
We need to type every data type and every function, so the type system will be rolled out over a long period of time.
The 1.17 release meant that we now have a gradual type system, which runs in every code being compiled, but it only supports a handful of types (including the dynamic one). The full list of supported types and examples of typing violations it can now detect is on the announcement: https://elixir-lang.org/blog/2024/06/12/elixir-v1-17-0-relea...
There is no support for type annotations, that comes in a later stage. The overall stages have been described in an earlier article (and I believe also in the paper): https://elixir-lang.org/blog/2023/06/22/type-system-updates-...
klibertp|1 year ago
That's how it normally goes with gradual type systems for existing languages, I think. The first step seems to be almost always adding a type checker that doesn't do anything in particular other than handling untyped code. Since being able to handle untyped code makes a type system gradual, announcing Elixir as "gradually typed" when this milestone is reached seems justified. After that, you're free to improve the type system and type checker(s), improve type inference, add specialized syntax, improve typed/untyped interactions, cover more language patterns, and so on. MyPy for Python also started without support for many things that were added later (and it's still being actively developed ten years later).
sodapopcan|1 year ago
- Map keys (called with '.') are checked at compile time.
- Using comparison operators with different types causes a warning.
I may be forgetting something.