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

Richard O'Keefe ok@REDACTED
Fri Jul 29 01:45:21 CEST 2011


One of the things criticised in the blog entry that we've been responding to was
that
	{ok,Foo} = bar(...),
	{ok,Foo} = ugh(...)
is too easy to write (when you really meant, say, Foo0, Foo1).

This is a well defined part of the language, and it would not be a good idea to
ban it.  But how about an optional style warning (and we really need
	-warn(on | off, [warning...])
directives) whenever a bound variable appears in a pattern on the left of "="?





More information about the erlang-questions mailing list