Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'debug': 0.05; 'implements': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sentence': 0.09; 'terry': 0.09; 'thread,': 0.09; ':-)': 0.13; 'arrived': 0.16; 'message-id:@dough.gmane.org': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'sorting': 0.16; 'wrote:': 0.17; 'numerical': 0.17; '>>>': 0.18; '(or': 0.18; 'sort': 0.21; 'universal': 0.22; 'chapter': 0.23; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'am,': 0.27; 'checking': 0.27; 'header:X -Complaints-To:1': 0.28; 'classes': 0.30; "skip:' 10": 0.30; 'code': 0.31; '(and': 0.32; 'implement': 0.32; 'from:addr:yahoo.co.uk': 0.32; 'skip:j 20': 0.33; 'to:addr:python- list': 0.33; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'anything': 0.36; 'subject:: ': 0.38; 'mark': 0.38; 'easier': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'easy': 0.60; 'skip:u 10': 0.60; 'subject:, ': 0.61; 'strange': 0.62; 'more': 0.63; 'making': 0.64; 'comparable': 0.84; 'max,': 0.84; 'unloading': 0.84; 'received:89': 0.86; 'kat': 0.91; 'subject:skip:E 10': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Encapsulation, inheritance and polymorphism Date: Tue, 17 Jul 2012 20:39:53 +0100 References: <3vnfd9-343.ln1@satorlaser.homedns.org> <-8SdnVrXGqie25jNnZ2dnUVZ7qKdnZ2d@bt.com> <4YudnY5tG-6-IJjNnZ2dnUVZ8gidnZ2d@bt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-89-243-194-149.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <4YudnY5tG-6-IJjNnZ2dnUVZ8gidnZ2d@bt.com> X-Antivirus: avast! (VPS 120717-0, 17/07/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1342553994 news.xs4all.nl 6850 [2001:888:2000:d::a6]:37631 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25536 On 17/07/2012 20:29, Lipska the Kat wrote: > 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 > I would like to spend more time on this thread, but unfortunately the 44 ton artic carrying "Java in a Nutshell Volume 1 Part 1 Chapter 1 Paragraph 1 Sentence 1" has just arrived outside my abode and needs unloading :-) -- Cheers. Mark Lawrence.