Docs: Section on local variables

Jonathan M Davis jmdavisProg at gmx.com
Thu Apr 26 15:09:29 PDT 2012


On Thursday, April 26, 2012 23:52:48 bearophile wrote:
> Jonathan M Davis:
> > I don't even know the last time that I saw an unused
> > variable left in code (except for on purpose in something like
> > isInputRange).
> 
> So if the compiler warns you of unused variables, this will not
> cause your code almost no warnings. No troubles for you. For
> uncommon situations like isInputRange a specific annotation
> solves the problem cleanly.

And I'd argue that we might as well save ourselves the trouble of having to 
deal with yet _another_ special annotation just so that we can have warnings 
about something which is generally a non-issue.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list