Typing system vs. Java

Peter Hansen peter at engcorp.com
Tue Jul 31 09:33:22 EDT 2001


Michael Abbott wrote:
> 
> I for one would like to see a strongly typed variant
> of Python: if for nothing else, I'd like to be able to compile my code.

How would that let you compile your code?  Lack of compile-time
type checking is hardly the only thing making it difficult to
develop a Python compiler.

More to the point, why would you want to compile your Python code?

If for packaging reasons, there are effective alternatives in
the form of, for example, py2exe.

If for performance, the better approach is perhaps to profile your
code, then rewrite the performance-critical portions as C 
extensions.  Then you have pretty much the best of both worlds.

> Let me just observe this: statically typed Python would need to be a
> different language from standard Python, though hopefully close enough to
> interoperate and have the same name.

It would be interesting, perhaps, to see how well such a beast
would be adopted by the programming community.  I can just see
the "marketing war" triggered as both sides try to promote
their own version of Python as the One True Way to program...

-- 
----------------------
Peter Hansen, P.Eng.
peter at engcorp.com



More information about the Python-list mailing list