Pascal Costanza wrote: > David Hopwood wrote: >> Marshall wrote: >> >>> The real question is, are there some programs that we >>> can't write *at all* in a statically typed language, because >>> they'll *never* be typable? >> >> In a statically typed language that has a "dynamic" type, all >> dynamically typed programs are straightforwardly expressible. > > What about programs where the types change at runtime?
Staged compilation is perfectly compatible with static typing. Static typing only requires that it be possible to prove absence of some category of type errors when the types are known; it does not require that all types are known before the first-stage program is run. There are, however, staged compilation systems that guarantee that the generated program will be typeable if the first-stage program is. (It's clear that to compare the expressiveness of statically and dynamically typed languages, the languages must be comparable in other respects than their type system. Staged compilation is the equivalent feature to 'eval'.) -- David Hopwood <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list