Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.90.MISMATCH!newsfeed.xs4all.nl!newsfeed7.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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'python,': 0.02; 'guido': 0.05; 'rejected': 0.05; 'accepted,': 0.09; 'before.': 0.09; 'follows.': 0.09; 'given,': 0.09; 'ignoring': 0.09; 'mentions': 0.09; 'python': 0.10; "hasn't": 0.15; 'bug,': 0.16; 'combination,': 0.16; 'dismiss': 0.16; 'general.': 0.16; 'unnecessary.': 0.16; 'wrote:': 0.16; 'example.': 0.18; '>>>': 0.20; '2015': 0.20; 'developer': 0.20; "we'd": 0.21; 'arguments': 0.22; 'mind.': 0.22; 'am,': 0.23; 'code,': 0.23; 'examples': 0.24; 'header:In-Reply-To:1': 0.24; 'all.': 0.24; 'feature': 0.24; "doesn't": 0.26; 'example': 0.26; 'chris': 0.26; 'equivalent': 0.27; 'mostly': 0.27; 'least': 0.27; 'message-id:@mail.gmail.com': 0.27; '14,': 0.27; 'idea': 0.28; 'argue': 0.29; 'bad.': 0.29; 'feature,': 0.29; 'release.': 0.29; 'ago': 0.29; 'asked': 0.29; 'subject:/': 0.30; 'code': 0.30; 'somebody': 0.30; 'post': 0.31; 'core': 0.32; 'language.': 0.32; 'maybe': 0.33; 'getting': 0.33; 'useful': 0.33; "d'aprano": 0.33; 'proposals': 0.33; 'steven': 0.33; 'changing': 0.34; 'tue,': 0.34; 'received:google.com': 0.35; 'could': 0.35; 'community': 0.36; 'but': 0.36; 'too': 0.36; 'instead': 0.36; 'possible': 0.36; "wasn't": 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'being': 0.37; 'expect': 0.37; 'why': 0.39; 'goes': 0.39; 'along': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'some': 0.40; 'hope': 0.61; 'caused': 0.61; 'course': 0.62; 'is.': 0.63; 'six': 0.65; 'picked': 0.66; 'decided': 0.66; 'jul': 0.72; 'useful.': 0.72; 'forth': 0.79; 'gain': 0.82; 'bitten': 0.84; 'defensive': 0.84; 'difficult?': 0.84; 'examples.': 0.84; 'flaw,': 0.84; 'iterative': 0.84; 'pardon': 0.84; 'reading,': 0.84; 'to:name:python': 0.84; 'difficult,': 0.91; 'played': 0.91; 'convinced': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=kcBX74g+paWFIQzGq+Or5s2neaE2vPJdNKEz3avebAs=; b=y44/aieXIRVNhBOgYXL2sZWkiOo0UN3I7QdyTjn9YCjR7ZZERI83y7+8cTa0MdQ5iK Uiz36ST6mpQ7aeX5cE+WMiFBp+3bUBmd70DtrtGyNQI6yVk7NM8jmA5xOmd4aq4duPM5 jCsZqaLdzBzeehWOwOgoml3/c2Ga3eEhYO+yqBV6Jb/sIwXIN10a+TVi9VXz4b4YOQ5y g8kP2cbGT7MluPOZ4W+3weiRGDMzEQCOOf3apr0l+iB321TvqPe0hGDEaUM3opLa+VWG 287Dikmv8pBkiOZZbg4CRdtLhpkfEydPHV0mYHdnWaCDQ8RqVu9fXpeB6MMloFDbc34f Hwkg== X-Received: by 10.170.83.213 with SMTP id z204mr41437848ykz.63.1436862890746; Tue, 14 Jul 2015 01:34:50 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <55A4B9C1.4000009@rece.vub.ac.be> References: <55A3A853.4040006@rece.vub.ac.be> <55A3C366.6060602@rece.vub.ac.be> <55a48017$0$1673$c3e8da3$5496439d@news.astraweb.com> <55A4B9C1.4000009@rece.vub.ac.be> From: Ian Kelly Date: Tue, 14 Jul 2015 02:34:11 -0600 Subject: Re: Possibly Pythonic Tail Call Optimization (TCO/TRE) To: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 47 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1436862898 news.xs4all.nl 2835 [2001:888:2000:d::a6]:44988 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 6774 X-Received-Body-CRC: 1677372724 Xref: csiph.com comp.lang.python:93798 On Tue, Jul 14, 2015 at 1:26 AM, Antoon Pardon wrote: > On 07/14/2015 05:20 AM, Steven D'Aprano wrote: >> On Tue, 14 Jul 2015 12:05 am, Chris Angelico wrote: >> >>> If you want to make an assertion that iterative >>> code requires equivalent warping to tail-recursive code, I want to see >>> an example of it. Is that difficult? >> Of course it is. If it wasn't difficult, people would post examples instead >> of getting all defensive about being asked for examples. > > Shrug! I have seen this game played before. It has been played since before > python had an if-expression. It always goes as follows. Some one mentions > a feature python doesn't has and that could be useful. The python status-quo > people will argue that it is unnecessary. Any example that will be given > to illustrate the advantage will be nit picked appart for any possible flaw, > while mostly ignoring the flaws in the status quo. > > Before python had an if-expression, examples were asked too and they > convinced > noone. It wasn't until a core developer was bitten by an elusive bug, caused > by using the then advised "and or" combination, that python got an > if-expression > and that an if-expression was considered useful by the python community > in general. > > I expect any example given, to be used as a contest by those reading, > for finding > the least warped alternative and then using that to dismiss the example. > > So I really don't feel compelled to search through my code in the hope > of finding > an example that would persuade someone. And yet, Python somehow manages to gain new features with each release. The reason why most proposals get rejected is because most proposals are bad. If every idea that came along just got accepted, we'd have a disastrous hodge-podge of a language. In the case of TCO, Guido rejected the feature six years ago and hasn't shown any sign of changing his mind. He considered the arguments for it, and he decided that for Python, the benefits don't outweigh the drawbacks. Maybe his mind could still be changed, but it's going to take somebody to make a very convincing case for the feature, and if you're not even willing to put forth some examples then you don't have a case at all.