Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!texta.sil.at!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news.tele.dk!news.tele.dk!small.news.tele.dk!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.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'cc:addr:python-list': 0.11; 'def': 0.12; '"good': 0.16; '-tkc': 0.16; 'args:': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'subject:Programming': 0.16; 'subject:python': 0.16; 'weird': 0.16; 'wrote:': 0.18; "python's": 0.19; 'things.': 0.19; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'this:': 0.26; 'primary': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'points': 0.29; "i'm": 0.30; '(since': 0.31; 'implemented': 0.33; 'programmers': 0.33; 'could': 0.34; 'something': 0.35; 'but': 0.35; 'crazy': 0.36; 'charset:us-ascii': 0.36; 'example,': 0.37; 'two': 0.37; 'making': 0.63; 'hearing': 0.63; 'name': 0.63; 'become': 0.64; 'optimized.': 0.84; 'received:50.22': 0.84; '2013,': 0.91; 'to:addr:nobody': 0.96 Date: Mon, 30 Sep 2013 16:02:18 -0500 From: Tim Chase To: Franck Ditter Subject: Re: Functional Programming and python In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: none Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1380574841 news.xs4all.nl 15943 [2001:888:2000:d::a6]:57042 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:55117 On 2013-09-30 19:04, Franck Ditter wrote: > two points make me crazy : > 1. Tail recursion is not optimized. We are in 2013, why ? This is > known technology (since 1960). And don't answer with "good > programmers don't use recursion", I seem to recall hearing that the primary reason it hadn't been implemented is because of Python's super-dynamism (to make up a word). That a function could be a tail recursion in one call, but the calling the same name could then become rebound. I'm making up the example, but I think it was something like this: def kablooie(*args): if not args: def kablooie(*args): woah() do_something(args) kablooie(args[1:]) where tail recursion optimization would do weird things. -tkc