warn_unused_vars (Was: Re: Noob - Getting Started Infinte Loop?)

Richard Carlsson <>
Fri Sep 1 11:16:36 CEST 2006


Thomas Lindgren wrote:
>> Seriously, that would be a bad idea. It catches _way_ too many
>> errors (nasty, hard-to-find typo bugs) to be turned off by default.
> 
> Not in my experience. I have it turned off in my makefiles and aren't
> having any problems worth mentioning.

Well, it could be because (again)* you're probably only representative
of less than a percent of all Erlang programmers. (Well, you are.) Or
because you're just not aware of some lurking bugs in your code.

When warnings for unused variables were turned on by default a
couple of years ago, it shook out a number of bugs that had been
hiding in the standard libraries and OTP code for ages.

	/Richard

*Note to newbs and anyone else with less than 10 years' Erlang
experience: that Robert Virding and Thomas Lindgren don't find
unused-variable warnings all that useful, does *not* mean that
you too have a license to turn off the warnings. Really.
(For comparison: http://en.wikipedia.org/wiki/Alain_Robert)




More information about the erlang-questions mailing list