Detector for unused variables
Regan Heath
regan at netmail.co.nz
Wed Aug 1 06:02:31 PDT 2012
On Wed, 01 Aug 2012 12:03:01 +0100, Andre Tampubolon <andre at lc.vlsm.org>
wrote:
> The Go compiler is able to detect unused variables, and strangely they
> are regarded as an error.
It's not really a question of "able" to, or not. I'm sure were Walter to
decide to add this feature to D he would also be "able" to.
It also doesn't matter what another language choses to do.
Why you'd want an unused variable to be an error is beyond me - it has
absolutely no effect on the resulting executable, if it did it would be a
bug.
What matters, ultimately, from a user point of view is whether the feature
exists or not. We can solve that by having a 3rd party tool bundled with
the compiler and this would be the best solution for all the reasons
outlined earlier.
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d-learn
mailing list