Hacker News new | ask | show | jobs
by erszcz 2757 days ago
https://github.com/josefs/Gradualizer already introduced above by Zalastax is one project which shows how to do it. It implements the gradual typing model, which merges static typing a'la ML/Haskell, with dynamic typing of Erlang. Other real-world examples of gradually typed languages are Facebook's Hack and TypeScript.

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

1 comments

So basically what i said. We do not know how to statically type it, just try to provide some false safety.