Python from Wise Guy's Viewpoint

Matthias Blume find at my.address.elsewhere
Mon Oct 27 11:35:57 EST 2003


Pascal Costanza <costanza at web.de> writes:

> Matthias Blume wrote:
> > Ed Avis <ed at membled.com> writes:
> > 
> >>Pascal Costanza <costanza at web.de> writes:
> >>
> >>
> >>>>Should we then conclude that compile-time syntax checking is not
> >>>>worth having?
> >>>
> >>>No. Syntax errors make the program fail, regardless whether this is
> >>>checked at compile-time or at runtime.
> >>>
> >>>A type "error" detected at compile-time doesn't imply that the
> >>>program will fail.
> >>
> >>Actually it does, in a statically typed language.
> > Nitpick: Neither syntactic nor statically checked type errors make
> 
> > programs fail. Instead, their presence simply implies the absence of a
> > program.
> 
> Yes, the absence of a program that might not fail if it wouldn't have
> been rejected by the static type system.

"would" "if"  bah

You first have to define what the meaning of a phrase is going to be
if you let it slip past the type checker even though it is not
well-typed.  As Andreas Rossberg pointed out, it is quite often the
case that the type is essential for understanding the semantics.
Simply ignoring types does not necessarily make sense under such
circumstances.  So it all depends on how you re-interpret the language
after getting rid of static types.

Matthias




More information about the Python-list mailing list