[Issue 3960] Unused local variables not reported

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 2 06:56:09 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=3960


Marco Leise <Marco.Leise at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Marco.Leise at gmx.de


--- Comment #17 from Marco Leise <Marco.Leise at gmx.de> 2012-02-02 06:56:03 PST ---
(In reply to comment #9)
> I would point out that if it is made an error to have unused local variables,
> function parameters must _not_ be included in it. That would be a major problem
> in cases where overridden functions don't use all of their parameters, but they
> have to have them because the base class' function does.

In languages where you cannot omit the name of the parameter it is a problem.
In D you just leave the parameter name away and this problem is solved + it
becomes evident from looking at the method, that it doesn't use a certain
parameter. That would make a nice coding standard as well.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list