News for hackers. Stuff that matters.
Re:Elixir's “Set Theoretical Type System” prototype/demo/sho... by bongobingo1 on Tuesday June 13, 2023 @11:12PM (#36320969)
My understanding is (from your twitch stream), that the type system will initially be obscured from developers. I guess this means it's going to hook into the existing `type` and `spec` features of elixir?

Do you think we'll end up writing

    $ integer() -> integer()
    @spec inc(integer) :: integer()
    def inc(i), do: i + 1
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.

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