Python from Wise Guy's Viewpoint

Marshall Spight mspight at dnai.com
Fri Oct 24 18:14:55 EDT 2003


"Pascal Costanza" <costanza at web.de> wrote in message news:bnc57b$pv6$1 at f1node01.rhrz.uni-bonn.de...
> Marshall Spight wrote:
> > "Pascal Costanza" <costanza at web.de> wrote in message news:bnbafk$uu6$1 at f1node01.rhrz.uni-bonn.de...
> >
> >>... there exist programs that work but
> >>that cannot be statically typechecked. These programs objectively exist.
> >>By definition, I cannot express them in a statically typed language.
> >
> > I agree these programs exist.
> >
> > It would be really interesting to see a small but useful example
> > of a program that will not pass a statically typed language.
> > It seems to me that how easy it is to generate such programs
> > will be an interesting metric.
> >
> > Anyone? (Sorry, I'm a static typing guy, so my brain is
> > warped away from such programs. :-)
>
> Have you ever used a program that has required you to enter a number?
>
> The check whether you have really typed a number is a dynamic check, right?

This is not an example of what I requested. I can easily write
a statically typed program that inputs a string, and converts
it to a number, possibly failing if the string does not parse to a number.

I was asking for a small, useful program that *cannot* be written
in a statically compiled language (i.e., that cannot statically
be proven type-correct.) I'd be very interested to see such
a thing.


Marshall






More information about the Python-list mailing list