Python from Wise Guy's Viewpoint

Matthew Danish mdanish at andrew.cmu.edu
Tue Oct 28 15:34:58 EST 2003


On Tue, Oct 28, 2003 at 06:52:08PM +0000, John Atwood wrote:
> Matthew Danish  <mdanish at andrew.cmu.edu> wrote:
> >* 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.
> 
> If the code is executed in the environment, and one can execute
> arbitrary snippets of code, it's an interpreted environment, 
> regardless of whether the code executed is native, bytecode,
> or other.

So long as you are clear on the meaning.  For most people, calling
something an interpreted environment implies lack of compiler.

> >* 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.
> 
> Yes, and that's a good thing. It prevents the program form getting in an 
> unreachable/inconsistent state, and secondly, in an FP, especially a pure 
> FP, with explicit state, one need not run the program from the start to 
> test whatever code is of interest at the moment, because the state can be 
> created via test cases.

And it also gets in the way of the flexibility traditionally associated
with dynamically typed languages.  It gets in the way of development and
debugging as well.  And as for pure FP, can you recreate network
connection state at will?  So that the other end doesn't even know
something went wrong (besides the delay)?

-- 
; 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