warn_unused_vars (Was: Re: Noob - Getting Started Infinte Loop?)
Thomas Lindgren
thomasl_erlang@REDACTED
Fri Sep 1 09:57:58 CEST 2006
--- Richard Carlsson <richardc@REDACTED> 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.
>
> Oh, not in _your_ code, of course. Goes without
> saying. ;-)
Not in my experience. I have it turned off in my
makefiles and aren't having any problems worth
mentioning.
If we're talking microfeatures, implicit variable
matching has been a larger source of bugs, likewise
the bizarro-world scoping rules for BIFs.
Anyway, since this particular one can be turned off
with a compiler switch (+nowarn_unused_vars, Robert),
it's not a big problem in my book.
Best,
Thomas
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the erlang-questions
mailing list