S
Stefan Axelsson
Paul said:I do believe that it's a horrible deficiency in Python that it has no
declarations at all, even optional ones, like "perl -w" or "use
strict". Python's scoping hacks that result from the lack of
declarations just seem to me like pure insanity.
Yes, ignoring most of the debate about static vs. dynamic typing, I've
also longed for 'use strict'. Sure Python isn't as bad as (say) Awk in
this respect; you have to at least assign a variable to make it spring
into existence, but I've been bitten by typos there as well. Same when
it comes to object methods (I can often never remember my method names).
Pychecker helps to some extent, but I wouldn't mind a compiler that only
accepted identifiers that had been declared. I don't think that anyone
could argue that typing 'use apa' before the first actual use (or words
to that effect) would 'slow them down', or be very onerous.
Stefan,