Compiler to warn on used underscore-variables
Zoltan Lajos Kis
kiszl@REDACTED
Mon Jan 4 22:49:04 CET 2010
Hello all,
Currently the compiler outputs a warning if a variable is only used
once. The "standard" way to suppress this warning is to put an
underscore in front of the variable name.
As a result, an underscore-variable in source codes gives us (at least
for me) the false notion that it is not a real variable, but only a
means to enhance code readability.
However the compiler treats them just like ordinary variables, resulting
in unexpected (i.e. most astonishing ;-)) no match exceptions.
My question is: what is your opinion about / is it possible to modify
the compiler so that it outputs a warning if an underscore-variable is
used (not unused) in the code ?
Thanks,
Zoltan.
More information about the erlang-questions
mailing list