Python from Wise Guy's Viewpoint

Matthew Danish mdanish at andrew.cmu.edu
Sat Oct 25 07:24:11 EDT 2003


On Sat, Oct 25, 2003 at 12:37:38AM +0000, John Atwood wrote:
> Pascal Costanza  <costanza at web.de> wrote:
> 
> >- when a test case gives me an exception, I can inspect the runtime 
> >environment and analyze how far the test case got, what it already 
> >successfully did, what is missing, and maybe even why it is missing. 
> >With a statically typed language, I wouldn't be able to get that far.
> >
> >Furthermore, when I am still in the exceptional situation, I can change 
> >variable settings, define a function on the fly, return some value from 
> >a yet undefined method by hand to see if it can make the rest of the 
> >code work, and so on.
> 
> That's because you're in an interpreted environemt, not because you're 
> using a dynamically typed language.  Interpreters for statically typed 
> languages allow the same.

Wrong on all counts.

* Most Common Lisp environments compile to native code, even when
  working interactively.
  SBCL, for example, has no interpreter whatsoever.  The interpreter is
  simulated by calling the compiler and evaluating the resulting
  function immediately.
* There exists statically typed language implementations which do the
  same (SML/NJ)
* The behavior of redefinition in a statically typed environment
  is far different from the behavior in a dynamically typed environment.
  For one thing, generativity of names kicks in, which makes it
  basically impossible to redefine types and functions without
  recompiling all uses (and thus restarting your program), in a static
  environment.

-- 
; Matthew Danish <mdanish at andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."




More information about the Python-list mailing list