In article <[EMAIL PROTECTED]>,
Christoph Zwerschke  <[EMAIL PROTECTED]> wrote:
>Simon Percivall wrote:
> > First: It's perfectly simple in Java to create a binary sort that
> > sorts all arrays that contain objects; so wrong there.
>
>My point was that the *same* Java source example, directly converted to 
>Python would *automatically* accept all kinds of arrays.

And the same code converted to SML would automatically work on all
kinds of arrays and SML is statically typed.  It's a language issue,
not a typing issue.

>No need to make any extra efforts.
>By the way, how would you do it in Java? With 
>function overloading? I would not call that perfectly simple.

Since Java doesn't allow function overloading that clearly can't be
the way.  J2SE 5.0 allows generic classes and functions that operate
on generic containers.  There are some gotchas, but it's not drastically
more complex than the original int-only java code.

Alan
-- 
Defendit numerus
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to