Other Software > Developer's Corner
Python Language Annoyances
Armando:
I just read the 2 linked articles above and really liked them. Thanks !
Apart from the good summary on the importance of good redundancy, here's an excerpts I particularly liked... in relation to "implicit variable declaration":
[...] when you’re designing an interface for programmers, even yourself, the real important thing suddenly becomes “How can I prevent the programmer from messing up?”. It’s like designing any interface, the weakest link is always the human factor. Even if it’s the best programmer in the world, a highly unreliable computer will still make that human look like a giant pile of shoddy engineering. So it’s your job, as the language/interface/API designer, to do whatever you can to minimize that risk of programmer error.
Another way to think of the issue is in terms of “good redundancy versus bad redundancy”. [...] Walter Bright explains it best:
“[...] since the compiler can figure the need for declarations from the context, [variable] declarations seem like prime redundancies that can be jettisoned. This is called implicit variable declaration. It sounds like a great idea, and it gets regularly enshrined into new languages. The problem is, the compiler cannot tell the difference between an intended new declaration and a typo - and the poor maintenance programmer can’t tell, either. After a while, though, the lesson about redundancy is learned anew, and a special switch will be added to require explicit declaration.”
-Abscissa's Page
--- End quote ---
(My emphasis)
Navigation
[0] Message Index
[*] Previous page
Go to full version