Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Possibly Pythonic Tail Call Optimization (TCO/TRE) Date: Tue, 14 Jul 2015 20:43:45 +0300 Organization: A noiseless patient Spider Lines: 27 Message-ID: <87vbdmd48e.fsf@elektro.pacujo.net> References: <55A3A853.4040006@rece.vub.ac.be> <55A3C366.6060602@rece.vub.ac.be> <87fv4r1fre.fsf@jester.gateway.sonic.net> <877fq3nuwo.fsf@elektro.pacujo.net> <87pp3vm93f.fsf@elektro.pacujo.net> <55a54818$0$1652$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="16014"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bJ8/ZU/G3zVc7gCPjyoT9" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:LsTr6yAH/836vT9fS3w/nIDucS4= sha1:SS4yPPnsjBPDsyV9ye4yTwSCy6s= Xref: csiph.com comp.lang.python:93824 Steven D'Aprano : > C, in my opinion, is the poster child for how a programming language > should NOT be designed, and I don't want Python to go down the same > path. John Regehr writes: > > "... there are compilers (like GCC) where integer overflow behaved a > certain way for many years and then at some point the optimizer got > just a little bit smarter and integer overflows suddenly and silently > stopped working as expected. This is perfectly OK as far as the > standard goes. While it may be unfriendly to developers, it would be > considered a win by the compiler team because it will increase > benchmark scores." The problem there is in the C standard, not the compiler that complies with the standard. I don't like the way integer overflows are explicitly undefined in modern C. Similarly, I don't like the way tail call behavior is undefined in Python. Neither blemish gives me much trouble in practice. Marko