in reply to Re^7: Warnings on unused variables?
in thread Warnings on unused variables?
I'm deliberately conflating linear layout of code with the flow of the program, because that's what makes it easier to read. Exit points other than } are typically easier to notice, and can conceptually link "special thing happens here that I should watch for" with that point in a programmer's head.
I want a warning at the } if you have created an object that is going to do something special at that point and nothing has been done to make it visible. Call your destructor explicitly as a reminder, unless doing so would be even worse (i.e. you built a dozen of these objects in the same scope), in which case, put a single-line comment at the } and another at the line that turns off the warnings.
But as I said before, this is a stylistic thing, and I imagine it's not really worth getting into a big scuffle over it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Warnings on unused variables?
by Corion (Patriarch) on Sep 27, 2008 at 22:43 UTC | |
by AZed (Monk) on Sep 27, 2008 at 23:31 UTC | |
by Tanktalus (Canon) on Sep 28, 2008 at 02:53 UTC | |
by AZed (Monk) on Sep 28, 2008 at 06:24 UTC | |
by SuicideJunkie (Vicar) on Sep 29, 2008 at 17:35 UTC | |
by ikegami (Patriarch) on Sep 28, 2008 at 00:35 UTC | |
by AZed (Monk) on Sep 28, 2008 at 00:48 UTC | |
by Corion (Patriarch) on Sep 28, 2008 at 08:25 UTC |