[erlang-questions] Erlang and Akka

Richard A. O'Keefe ok@REDACTED
Sun Aug 31 23:47:16 CEST 2014


On 30/08/2014, at 12:16 AM, Thomas Lindgren wrote:

> 
> Second, Sven-Olof Nyström's old Erlang type analyzer was, at least in theory, capable of inferring types for erlang messages and processes.

Is there a reference for that?

> However, even if we remove a number of language features, an Erlang process can contain many receives connected by arbitrary control flow. Thus, I'd expect that a gen_fsm or suchlike where you essentially implement protocols could potentially yield a very complex type.

Type systems aren't all-or-nothing.  For example, Haskell's type
system seems pretty amazing and as precise as you could wish for,
until you meet dependent type systems like the one in Idris.

A process type need not be *precise* to be useful.  Indeed, when
you think about the fact that the type of a pid is not going to
change, while the precise set of messages it is ready to receive
*will* change from time to time, it's not clear that a precise
type would be useful at all.

A process type that can tell you "you idiot, you're trying to
send a message that this process will NEVER accept under any
conditions" is enough to be useful.











More information about the erlang-questions mailing list