variable declaration

Jeremy Bowers jerf at jerf.org
Tue Feb 1 13:12:02 EST 2005


On Tue, 01 Feb 2005 09:13:36 -0600, Thomas Bartkus wrote:
> *Is* there a reason why the interpreter couldn't/shouldn't require formal
> variable declaration?

You mean, other than the reasons already discussed at length in this
thread, not to mention many many others?

Your not *liking* the reasons doesn't make them any less the reasons. They
may not even be good reasons, nevertheless, there the reasons are.

If you're literally asking the question you are asking, re-read this
thread more carefully. If you're *really* asking "Give me a reason *I
like*", I suggest re-reading Alex's discussion on why maybe Python isn't
for everybody.

All I know is that I have created large programs and typos like you seem
mortally terrified of occur on average about once every *ten modules* or
so, and are generally caught even before I write the unit tests. Breaking
the language to avoid what *by construction* is demonstrated not be a real
problem is... well, I believe Alex covered that, too.

Blah blah blah, "what if... what if... what if..." We should concentrate
on *real* problems, ones that exist in real code, not ones that mostly
exist in wild-eyed prose that consists of predictions of pain and death
that conspicuously fail to occur, no matter how many times they are
repeated or we are exhorted to heed them or face our doom. 

(The previous paragraph also describes my root problem with Java's strong
typing philosophy; death, doom, and destruction conspicuously fail to
occur in Python programs, so why the hell should I listen to the
doomsayers after I've already proved them false by extensive personal
experience? No amount of prose is going to convince me otherwise, nor
quite a lot of the rest of us.)



More information about the Python-list mailing list