declaration of variables?
Steven Taschuk
staschuk at telusplanet.net
Sun Feb 16 19:39:06 EST 2003
Quoth Jp Calderone:
[...]
> With declarations, any time I wanted a new variable, I'd have to type an
> extra keyword somewhere. Any time I decided I didn't need a variable any
> more, I'd have to go find where it was declared and remove it. If you think
> this isn't a significant hurdle, I recommend you go read some of the larger
> C projects out there. In many of them, you'll find all kinds of accrued
> variable cruft - variables people declared, used, and then discarded, but
> failed to remove the declarations. [...]
I entirely agree that variable declarations cost more than their
value.
Your latter point of orphaned declarations, however, has an easy
answer: a compiler which issues errors for variables used but not
declared should also issue warnings for variables declared but not
used.
--
Steven Taschuk | w_w
staschuk at telusplanet.net | ,-= U
| 1 1 Moose
More information about the Python-list
mailing list