[erlang-questions] Type inference in Erlang [WAS: Re: The compiler "eats" structures which are not separated by commas]

Ulf Wiger <>
Mon Apr 23 10:07:11 CEST 2012

On 23 Apr 2012, at 08:25, Kostis Sagonas wrote:

> On 04/23/2012 04:39 AM, Robert Virding wrote:
>> Type inferencing in erlang doesn't work. Unfortunately. There are too many places where it breaks down to be useful, for example message passing and code loading. There were attempts in the 90's by people much more knowledgeable than we were on this.
> OMG!
> ...
> Please think before you write statement that look authoritative but are plainly wrong.

Of course, there is always a balance between servicing the community with vivid discourse and protecting your reputation by never risking being wrong.

May I suggest that Robert's main mistake was using the word 'useful' - or specifically not clarifying the context. 

Obviously dialyzer is (extremely) useful, but there is a reason why it's off-line and doesn't actually give compilation errors, but merely advice.

> Kostis
> (*) Note that prohibiting code reloading in some cases is an action which actually might be a good idea even in Erlang as it is today! I really fail to see how the current practice of allowing reloading of single modules that are clearly incompatible with the rest of the system is a safe thing to do or a good idea. But that's a different topic…

Indeed, and an interesting one. This would require some chosen level of global analysis, but it might be a good option to have.

Ulf W

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.

More information about the erlang-questions mailing list