News for hackers. Stuff that matters.
Re:Elixir at Ramp by pzmarzly on Friday November 24, 2023 @07:35PM (#38409954)
> The hottest news in the Elixir community is that it is currently experimenting with set theoretic type / gradual typing. Some french PHD is working on it

To expand on it: you can read the proposal[0] or watch the video presentation by the author[1].

It is a very similar system to Typescript, with (at the first glance) only minor differences: "any" becomes "term", primitive constants are not singleton types (so you cannot write programs with type system alone... yet), and I expect some edge cases around generics will be handled differently (especially since you cannot specify types yourself in function calls, i.e there is no myFunction<MyType1, MyType2>()).

On the other side, there are some things that the proposal seems to be doing better than Typescript. It handles type assertions without the need for "function isX(maybeX): asserts maybeX is X { ... }" and since pattern matching plays important role in Elixir, I expect it will have a lot of polish around that.

[0] https://arxiv.org/pdf/2306.06391.pdf

[1] https://youtu.be/gJJH7a2J9O8

There are no comments on this comment yet.