Encapsulation, inheritance and polymorphism

Lipska the Kat lipska at lipskathekat.com
Tue Jul 17 15:29:36 EDT 2012


On 17/07/12 18:07, Terry Reedy wrote:
> On 7/17/2012 10:23 AM, Lipska the Kat wrote:
>
>> Well 'type-bondage' is a strange way of thinking about compile time type
>> checking and making code easier to read (and therefor debug
>

snip

>
> How easy was it to write max, or a universal sort in Java?
>
Well java.lang.Math.max() (or min() depending on what you want) might do 
it and as for sorting ... java.utils.Collections.sort will sort anything 
that implements the java.util.Comparable interface. All the standard 
numerical classes implement Comparable by default so there is nothing to 
do really.

Lipska

-- 
Lipska the Kat: Troll hunter, Sandbox destroyer
and Farscape dreamer of Aeryn Sun.



More information about the Python-list mailing list