[erlang-questions] How about a new warning? Was: Re: trouble with erlang or erlang is a ghetto

Tim Watson watson.timothy@REDACTED
Thu Aug 4 11:55:23 CEST 2011


> In normal code, however, I use this very sparingly. Then again, I
> seldom experience this as a problem. Thinking back, most of the times
> I've been bitten by this is probably in case clauses, especially when
> adding code. Typically, when using canonical variables like Pid,
> Reason or Result without checking that the code isn't in a branch
> which already uses it. And since I agree with Robert that case and
> receive should not cause a warning, I don't really feel the need for
> it.
>

I suspect most experienced Erlang developers don't get bitten by this.
Going back to the blog post that was the genesis of the original
thread, the person in question (whose name I've forgotten) was
complaining about this because the match fails at runtime. I think
it's just an example of someone whose not used to single assignment
and finds that they don't like it in practise. I would qualify that
statement by pointing out the poster also went on to actually suggest
that single assignment is bad. I don't agree but each to their own.



More information about the erlang-questions mailing list