Typed Python?

Donn Cave donn at drizzle.com
Sat Jul 3 18:38:53 CEST 2004

Quoth Thomas Reichelt <XXNOSPAMXX at gibts.net>:
| short question: is there any language combining the syntax, flexibility and
| great programming experience of Python with static typing? Is there a
| project to add static typing to Python?

I haven't tried it, but Nice is a Java based language with a more
sophisticated type system than Java, and a few extra conveniences.


It doesn't appear to have type inference, which so far as I know
may be exclusive to functional languages, but it does have the
"contract", "interface" etc. stuff that seems to be needed with
statically typed object oriented languages.  I can't tell right
away from the web pages, but it looks like subtype polymorphism
is all you get - so for example in a context that expects a File,
you can't show up with something that was just built in the shape
of a File, it has to be a subclass of File.  Again as usual with
object oriented languages.  But the type system certainly looks
more powerful, the language looks more expressive whatever that
means, and the Java implementation means lots of libraries.

Haskell is a conundrum.  Not many known users outside of academia,
some kind of intractable problems that seem likely to keep it that
way, but it has deep roots and has become the archetypal functional
programming language with a supportive community that shows no signs
of withering away.  And after all it's an inspiring language to use.
Not like the other relatively popular functional programming language
these days, rather the opposite.

	Donn Cave, donn at drizzle.com

More information about the Python-list mailing list