Python from Wise Guy's Viewpoint

Andrew Dalke adalke at mindspring.com
Thu Oct 23 00:02:32 EDT 2003


Pascal Costanza:
> The set of programs that are useful but cannot be checked by a static
> type system is by definition bigger than the set of useful programs that
> can be statically checked. So dynamically typed languages allow me to
> express more useful programs than statically typed languages.

Ummm, both are infinite and both are countably infinite, so those sets
are the same size.  You're falling for Hilbert's Paradox.

Also, while I don't know a proof, I'm pretty sure that type inferencing
can do addition (and theorem proving) so is equal in power to
programming.

> I don't need a study for that statement because it's a simple argument:
> if the language doesn't allow me to express something in a direct way,
> but requires me to write considerably more code then I have considerably
> more opportunities for making mistakes.

The size comparisons I've seen (like the great programming language
shootout) suggest that Ocaml and Scheme require about the same amount
of code to solve small problems.  Yet last I saw, Ocaml is strongly typed
at compile time.  How do you assume then that strongly&statically typed
languages require "considerable more code"?

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list