On 2007-06-16, Paul Rubin <http> wrote:
> Neil Cerutti <[EMAIL PROTECTED]> writes:
>> I vote for C++ as being astoundingly complex. But it provides
>> complex features, e.g.,the machanisms it provides to deal with
>> multiple inheritance, or generic, type-safe code.
>
> It gets off-topic but I'm not sure what advantage templates are
> supposed to have over ML-like polymorphism.

I don't know that much about ML. I know is does a really nice job
of generic containers, as does C++. But can it 'foo' any type as
easily as C++?

template <class T> T foo(T);

As an aside, templates are abusable for many sorts of valuable
compile-time computations and type arithmetic, though I'd never
write that code myself--it looks like death.

C++ templates allow for fancy duck-typing in C++, which Python
programmers love. The STL is a good example of the power of
duck-typing (though it oughta been called quack-typing).

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to