News for hackers. Stuff that matters.
Re:Erlang/OTP 21's new logger by di4na on Thursday November 29, 2018 @05:51AM (#18559335)
regarding point 3: In 2018, for an actor model on the BEAM, it is really easy to justify not being statically type. For a single simple reason.

No one knows how to do it. It is an open research problem and we are far from a solution still.

Re:Erlang/OTP 21's new logger by erszcz on Thursday November 29, 2018 @08:14AM (#18559916)
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

Re:Erlang/OTP 21's new logger by di4na on Thursday November 29, 2018 @08:36AM (#18560031)
So basically what i said. We do not know how to statically type it, just try to provide some false safety.
Re:Erlang/OTP 21's new logger by sidkshatriya on Thursday November 29, 2018 @06:07AM (#18559397)
That is true. But some other models of concurrency (e.g. golang channels) _do admit_ static typing. This is a weakness of actor model adopted in BEAM.

Its a tradeoff -- do you go with untyped BEAM concurrency or typed concurrency like in golang.

Re:Erlang/OTP 21's new logger by digitalzombie on Thursday November 29, 2018 @07:27AM (#18559690)
In Erlang you only care about cases that you care about. The let it crash mentality. Pattern matching is also good here too.

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.