--- Comment #12 from bearophile_h...@eml.cc 2011-06-11 02:41:14 PDT ---
(In reply to comment #11)
> (In reply to comment #8)
> > This is accepts-invalid, not an enhancement request.
> > http://www.digitalmars.com/d/1.0/function.html
> > "It is an error to declare a local variable that is never referred to."
> It actually seems more likely that this is a bug in the spec, as I think
> is against pretty much anything that requires flow analysis.
In the beginning this was an enhancement request, now someone has made it a
kind of error. But in the end the situation is the same. In most cases in well
written code you don't want unused variables, and various experiments have
shown that unused experiments are often associated with bugs. On the other hand
lint tools in C that are able to spot such unused variables are seldom used,
and several of the most used compilers do spot such unused variables today. So
I conclude that I'd like the D compiler to spot them automatically for me.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------