XXNOSPAMXX at gibts.net
Sat Jul 3 10:56:24 CEST 2004
Ville Vainio wrote:
>>>>>> "Jarek" == Jarek Zgoda <jzgoda at gazeta.usun.pl> writes:
> Jarek> Static typing would destroy all fun in Python. Eventually
> Jarek> we would end with ObjectPascal-like language, just running
> Jarek> in VM and not compiled.
> Using a type inference system, it wouldn't. The code would "flow" like
> it does now. Some corners of the code would probably benefit from
> having explicit declarations to smooth up the process, but most of the
> code could look exactly the way it does now.
Yes, type inference, for example, would be a great addition to Python! I
took a look at OCaml a while ago, but as I am not very addicted to pure
functional programming, it wasn't my thing. Also, compared to Python, the
number of libraries is small, and the support for UI is cumbersome... but
type inference is great.
What I would have in mind is a flag, or maybe language directive, that
switches static typing via type inference on. Of course, some of the
dynamic features of Python would have to be disabled then, but it would
result in better error-checking, and perhaps bytecode compilable to native
code, resulting in faster execution.
More information about the Python-list