What Would Smalltalk Do (WWSD)?
An interesting thing about Smalltalk is that although it does not have "type" declarations, the compiler does require "typeless" variable declarations. So both examples in the previous article would be caught by the compiler.
No only would the problems be caught, but the rich, integrated Smalltalk toolset would ask you to correct the spelling or automatically place the new variables in the declaration list.
Also, part of the rich Smalltalk toolset is "Small Lint" which is like pychecker, only funner.