OO in Python? ^^

Magnus Lycka lycka at carmen.se
Wed Dec 14 03:58:02 EST 2005


bonono at gmail.com wrote:
> Magnus Lycka wrote:
> 
>>The static typing means that you either have to make several
>>implementations of many algorithms, or you need to work with
>>those convoluted templates that were added to the language as
>>an afterthought.
> 
> I don't see this in Haskell.

No, I was refering to C++ when I talked about templates.

I don't really know Haskell, so I can't really compare it
to Python. A smarter compiler can certainly infer types from
the code and assemble several implementations of an
algorithm, but unless I'm confused, this makes it difficult
to do the kind of dynamic linking / late binding that we do in
Python. How do you compile a dynamic library without locking
library users to specific types?

I don't doubt that it's possible to make a statically typed
language much less assembly like than C++...



More information about the Python-list mailing list