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

Håkan Stenholm hokan.stenholm@REDACTED
Fri Sep 1 01:18:12 CEST 2006


Richard Carlsson wrote:

>Robert Virding wrote:
>  
>
>>Actually this is simple way to get rid of the annoying whining by the
>>compiler, just prepend every variable with _ and it keeps quiet. :-)
>>
>>Seriously I would prefer the default to be to keep quiet.
>>    
>>
>
>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.
>  
>
I agree, I'm all for compiler warnings like these - they are rather 
useful to find stupid mistakes, which I certainly make from time to time.

The only problem is if it becomes tedious (e.g. involves lots of of 
typing or extra code) to tell the compiler that it found a false 
positive, or if it finds lots of stuff that isn't really wrong.


>Oh, not in _your_ code, of course. Goes without saying. ;-)
>
>	/Richard
>
>  
>




More information about the erlang-questions mailing list