Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.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; 'repeated': 0.07; 'stack.': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'thread': 0.10; 'stack': 0.13; 'interest,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'thread.': 0.16; 'wrote:': 0.16; 'debugging': 0.18; 'explicit': 0.22; 'unix': 0.24; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'chris': 0.26; 'feature,': 0.29; 'tail': 0.29; "i'm": 0.30; 'hopefully': 0.33; 'replace': 0.35; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'chance': 0.60; 'charset:windows-1252': 0.62; 'family': 0.68; 'disappears': 0.84; 'difficult,': 0.91; 'proposition': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Serhiy Storchaka Subject: Re: Proposed keyword to transfer control to another function Date: Sat, 18 Jul 2015 06:48:13 +0300 References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 193.202.118.165 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1437191299 news.xs4all.nl 2852 [2001:888:2000:d::a6]:41144 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94049 On 17.07.15 02:46, Chris Angelico wrote: > Out of the lengthy thread on tail call optimization has come one broad > theory that might be of interest, so I'm spinning it off into its own > thread. > > The concept is like the Unix exec[vlpe] family of functions: replace > the current stack frame with a new one. This can be used for explicit > tail recursion without repeated stack frames, or for a pre-check that > then disappears out of the stack. Like any other feature, it can be > misused to make debugging difficult, but among consenting adults, > hopefully it can be used sensibly. I think there is no chance that this proposition will be accepted by Guido, because it makes debugging harder.