Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.news-service.com!news2.euro.net!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'versions,': 0.05; 'behavior.': 0.07; 'cpython': 0.07; 'terry': 0.07; 'wrapper': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'str': 0.09; 'subject:method': 0.09; 'values,': 0.09; 'am,': 0.14; 'extension': 0.14; 'wrote:': 0.14; 'identifiers,': 0.16; 'incompatible': 0.16; 'parameters,': 0.16; 'reedy': 0.16; 'subject:sort': 0.16; 'interface': 0.20; 'jan': 0.22; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'benefits,': 0.23; 'breaking': 0.23; 'parameters.': 0.23; 'thus': 0.24; 'implementing': 0.25; 'define': 0.26; 'parameters': 0.26; 'changing': 0.29; 'supports': 0.29; 'interface.': 0.29; 'costs.': 0.31; 'paul': 0.32; 'to:addr:python-list': 0.32; 'uses': 0.34; 'header:X-Complaints-To:1': 0.34; 'change': 0.34; 'requires': 0.35; 'header:User-Agent:1': 0.35; 'limitations': 0.35; 'stuck': 0.35; 'setting': 0.36; 'problems': 0.37; 'two': 0.37; 'some': 0.37; 'upgrading': 0.38; 'happens': 0.38; 'current': 0.38; 'received:org': 0.38; 'though': 0.38; 'listed': 0.39; 'to:addr:python.org': 0.39; 'header:Mime-Version:1': 0.39; 'takes': 0.40; 'header:Received:5': 0.40; 'addition': 0.62; 'become': 0.70; 'have.': 0.73; 'future,': 0.74; 'introduce': 0.78; 'gain': 0.80; 'python2': 0.84; 'subject:removal': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Guido rethinking removal of cmp from sort method Date: Fri, 01 Apr 2011 15:37:34 -0400 References: <4d7cbfcb$0$29971$c3e8da3$5496439d@news.astraweb.com> <4d94326c$0$30003$c3e8da3$5496439d@news.astraweb.com> <7x8vvue7or.fsf@ruckus.brouhaha.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 In-Reply-To: <7x8vvue7or.fsf@ruckus.brouhaha.com> 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: 29 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1301686668 news.xs4all.nl 81484 [::ffff:82.94.164.166]:45441 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:2387 On 4/1/2011 3:45 AM, Paul Rubin wrote: > What happens then is you define a new interface. In Microsoft-speak if > the IWhatever interface needs an incompatible extension like new > parameters, they introduce IWhatever2 which supports the new parameters. > They change the implementation of IWhatever so it becomes a wrapper for > IWhatever2 setting the new parameters to default values, to keep > implementing the old behavior. Now you have two versions, and eventually many more, to maintain and document. That takes resources we currently do not have. Some problems in addition to the benefits of this approach: 1. The users of IWhatever will not gain the benefits of IWhatever2. 2. Upgrading to IWhatever2 requires a change of name as well as off parameters. 3. If only some users are upgraded, the IWhatever and IWhatever2 users may become incompatible even though they were before, thus breaking code without changing the old interface. Example: Python2 added str2 (= unicode) on top of str. This had all the problems listed above. Since CPython uses str internally, in particular for identifiers, CPython users were stuck with the limitations of str. Rebinding str to mean str2 has many benefits, especially in the future, in addition to current costs. -- Terry Jan Reedy