No one knows how to do it. It is an open research problem and we are far from a solution still.
No one knows how to do it. It is an open research problem and we are far from a solution still.
Erlang already has a dual nature:
- the sequential part, which strives to be a pure and mostly side-effect free functional language
- the concurrent part, i.e. send, receive, process preemption, message delivery semantics, etc, which is inherently stateful due to interactions between stateful processes
Gradual typing fits this model well, because it provides soundness to the sequential part of the language, while leaves the message passing parts which _no one knows how to_ type dynamically typed.
BTW, I've spent a while to integrate Gradualizer with Vim - https://github.com/neomake/neomake/pull/2115
Its a tradeoff -- do you go with untyped BEAM concurrency or typed concurrency like in golang.
In Go you have to write code to catch unwanted error and figure out what can go wrong.
So there are many things in Erlang where it soften this no type weakness.