Re:Elixir's “Set Theoretical Type System” prototype/demo/sho...
by manusachi on Wednesday June 14, 2023 @01:56AM
(#36321959)
AFAIR, it should be possible to convert dialyzer specs to that new type system annotations. It would probably be not as precise, but could be a good enough starting point to then gradually make them more precise
Re:Elixir's “Set Theoretical Type System” prototype/demo/sho...
by josevalim on Wednesday June 14, 2023 @04:01AM
(#36322885)
Initially we will only leverage information from pattern matching and guards. There are no plans to leverage typespecs for now (as someone said below, they likely won't be as precise).
And yes, the semantics should map 100% cleanly to Erlang.
Re:Elixir's “Set Theoretical Type System” prototype/demo/sho...
by anne_biene on Friday June 16, 2023 @10:29AM
(#36357093)
There is interest from the Erlang community. Etylizer is a set-theoretic type checker developed for Erlang. We have different objectives, though, as we try to remain backwards compatible with the existing type specs. https://arxiv.org/pdf/2302.12783.pdf
Do you think we'll end up writing
or can the new type system be entirely expressed in `@spec` (perhaps with a slightly upgraded syntax), or perhaps we'll have the choice of @spec or $ (or @spec2.0, whatever).Additionally, do you feel there is any chance/desire/need of this bleeding up into Erlang? I can only assume the work done mapping the type system onto elixir would not require as much work to then map to Erlang if there were any interest.