Guido van Rossum

neopythonic.blogspot.com · Personal blog · on HN since 2008

Guido van Rossum, creator of Python, writes about Python's design choices, history, and language features such as tail calls and asyncio.

What HN saysHN links it mainly to explain why Python has no tail call elimination, citing his posts on the topic, and for his earlier views on Scala.
105HN people shared it
52linked it in comments
70stories submitted
1.3Kstory points
10 months agolast shared
2008people per year2026

Most-shared posts

  1. 1
    Tail Recursion Elimination
    22 people · 94 points · first shared 2009 · 27 comments on HN
  2. 2
    Guido's final word on Tail Calls
    11 people · 47 points · first shared 2009 · 22 comments on HN
  3. 3
    Reasoning about Asyncio.Semaphore
    8 people · 10 points · first shared 2022 · 1 comments on HN
  4. 4
    King's Day Speech (2016)
    6 people · 31 points · first shared 2016 · 2 comments on HN
  5. 5
  6. 6
    Why Operators Are Useful
    4 people · 5 points · first shared 2019 · discussion on HN
  7. 7
  8. 8
  9. 9
    Guido van Rossum: Before Python
    2 people · 209 points · first shared 2011 · 19 comments on HN
  10. 10
    GvR's Blog
    2 people · 33 points · first shared 2008 · 13 comments on HN
  11. 11
    Guido van Rossum on Scala
    2 people · 11 points · first shared 2008 · discussion on HN
  12. 12
    Neopythonic: Before Python
    2 people · 5 points · first shared 2012 · discussion on HN
  13. 13
    What to do with your computer science career
    2 people · 4 points · first shared 2018 · discussion on HN
  14. 14
    Tail Recursion Elimination (2009)
    2 people · 3 points · first shared 2013 · discussion on HN
  15. 15
    Letter to a Young Programmer (2013)
    2 people · 2 points · first shared 2014 · discussion on HN

What HN people wrote when they linked it

leoh · 2022-06-15
Worth reading why python doesn’t have it either http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.htm…
nabla9 · 2022-06-15
Also. Final Words on Tail Calls http://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.html Outside pure functional languages, I think the best way to implement them is to have explicit tail call declaration for functions and/and tail positions and ability to disable them for debugging (or have debugger aware of them). This way you can actually use them to implement useful stuff and rely on them. You get a compiler error if tail call can't be implemented.
deckiedan · 2014-03-08
Believe it or not, it's actually deliberate. And not that uncommon in other languages too. The only way you can realistially have 'unlimited' recursion is to use tail call optimisation, which is deliberaterly not implemented in python: http://neopythonic.blogspot.co.uk/2009/04/final-words-on-tail-calls.ht… Is Guido's take on it. Essentially, as I understand it, his take is that massive recursion is confusing, and 'unpythonic'. And with the whole 'explicit is better than implicit' thing, I guess there is a point. Some times recursion is the best/most obvious solution, and then it is a bit annoying to not have TCO, but you can usually work around it.
signa11 · 2012-09-18
I am kind of discouraged by following post by Guido on scala : http://neopythonic.blogspot.in/2008/11/scala.html?m=1. but perhaps this course would be sufficiently generic to not get bogged down by scala's peculiarities...
kerkeslager · 2025-12-24
> More importantly, Lua has a crucial feature that Javascript lacks: tail call optimization. There are programs that I can easily write in Lua, in spite of its syntactic verbosity, that I cannot write in Javascript because of this limitation. Perhaps this particular JS implementation has tco, but I doubt it reading the release notes. > [...] In my programs, I have banned the use of loops. This is a liberation that is not possible in JS or even c, where TCO cannot be relied upon. This is not a great language feature, IMO. There are two ways to go here: 1. You can go the Python way, and have no TCO, not ever. Guido van Rossum's reasoning on this is outlined here[1] and here[2], but the high level summary is that TCO makes it impossible to provide acceptably-clear tracebacks. 2. You can go the Chicken Scheme way, and do TCO, and ALSO do CPS conversion, which makes EVERY call into a tail call, without language user having to restructure their code to make sure their recursion happens at the tail. Either of these approaches has its upsides and downsides, but TCO WITHOUT CPS conversion gives you the worst of both worlds. The only upside is that you can write most of your loops as recursion, but as van Rossum points out, most cases that can be handled with tail recursion, can AND SHOULD be handled with higher-order functions. This is just a much cleaner way to do it in most cases. And the downsides to TCO without CPS conversion are: 1. Poor tracebacks. 2. Having to…
dgroshev · 2024-09-26
> But keeping the current half-baked async implementation doesn't make the language smaller or simpler. It just makes the language worse. I can't disagree more. In fact, I think that the current state of async Rust is the best implementation of async in any language. To get Pin stuff out of the way: it is indeed more complicated than it could be (because reverse compatibility etc), but when was the last time you needed to write a poll implementation manually? Between runtime (tokio/embassy) and utility crates, there is very little need to write raw futures. Combinators, task, and channels are more than enough for the overwhelming majority of problems, and even in their current state they give us more power than Python or JS ecosystems. But then there's everything else. Async Rust is correct and well-defined. The way cancellation, concurrent awaiting, and exceptions work in languages like JS and Python is incredibly messy (eg [1]) and there are very few people who even think about that. Rust in its typical fashion frontloads this complexity, which leads to more people thinking and talking about it, but that's a good thing. Async Rust is clearly separated from sync Rust (probably an extension of the previous point). This is good because it lets us reason about IO and write code that won't be preempted in an observable way, unlike with Go or Erlang. For example, having a sync function we can stuff things into thread locals and be sure that they won't leak into another…
recuter · 2013-08-27
http://neopythonic.blogspot.co.il/2011/06/depth-and-breadth-of-python.… "The contrast with my visitor the next day couldn't be greater. Through a former colleague I got an introduction to Drew Houston, co-founder and CEO of the vastly successful start-up company Dropbox. Python plays an important role in Dropbox's success: the Dropbox client, which runs on Windows, Mac and Linux (!), is written in Python. This is key to the portability: everything except the UI is cross-platform. (The UI uses a Python-ObjC bridge on Mac, and wxPython on the other platforms.) Performance has never been a problem -- understanding that a small number of critical pieces were written in C, including a custom memory allocator used for a certain type of objects whose pattern of allocation involves allocating 100,000s of them and then releasing all but a few. Before you jump in to open up the Dropbox distro and learn all about how it works, beware that the source code is not included and the bytecode is obfuscated. Drew's no fool. And he laughs at the poor competitors who are using Java." Sometime after that, Drew poached Guido from Google. I remember this post. :)
babarock · 2012-08-29
As long as we're on this subject, I'd like to strongly encourage programmers to adopt a "pen-and-paper" approach to problem solving. Just like mentionned in the article, there are great benefits coming from actually writing down the problem. For the past year or so, every time I worked on a non-trivial problem, I did it on a sheet of paper. It definitely took discipline at first but now I couldn't do it any other way. My motivation for adopting this approach came from reading a blog post by Guido Van Rossum (http://neopythonic.blogspot.fr/2011/07/before-python.html). Then I went to university in Amsterdam to study mathematics and they had a computer that was free for students to use! (Not unlimited though. We were allowed to use something like one second of CPU time per day. :-) "One second of CPU time per day" got me thinking. Sure there are benefits to having modernly cheap computers, but how did they do it before?
irahul · 2012-03-13
> Don't know if it should be a method or an attribute? Python has properties now, the user doesn't have to care. Python didn't have properties when the len protocol was implemented. What exactly will be gained if Python replaces len(a) with a.length(where a.length translates to a.__len__())? If properties were there from the beginning, that would have been the implementation; but since they weren't, len(a) is just fine and I don't see any reason for it to be changed. > The 'special meaning' section that follows seems a bit confused as well. Why is it so special to get the length of a collection? Personally I would have preferred __len__ to be just length, because length of a sequence is part of it's public interface, as opposed to other special methods viz. __getattr__, __getitem__. Apart from that, his 'special meaning' section is just saying that following a weird naming convention for the special methods permits programttacily differentiating between public interface and special methods. > I can feel it working within me too, I'm more and more on the fence about explicit self. The main reason it is that way is decorators. http://neopythonic.blogspot.in/2008/10/why-explicit-self-has-to-stay.h… > However this is complete and utter bullshit. This isn't an appropriate response to a well thought out article.
raganwald · 2012-01-10
Why is there even an argument about this? Not being able to make a recursive call without potentially blowing the stack is a major drawback in any language. I'd venture to say it's a "bug.” You aren’t going to like Python: I don't believe in recursion as the basis of all programming. This is a fundamental belief of certain computer scientists, especially those who love Scheme and like to teach programming by starting with a "cons" cell and recursion. But to me, seeing recursion as the basis of everything else is just a nice theoretical approach to fundamental mathematics (turtles all the way down), not a day-to-day tool. http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.htm… (I’m not advocating this view, just pointing out that there are programmers who appear in all other respects to be reasonable, intelligent, contributing members of computing society who actually feel that TCO is a bug, that 1000 calls ought to be enough for anybody, and so forth.)
nonameiguess · 2025-12-05
It's always amusing to see what Python has become thanks to NumPy and Django and how widely deployed it became when its intended purpose was always to be easy to understand, not performant. But just like JavaScript, people are going to hack it to death to make it fast anyway. Guido on tail calls 16 years ago: https://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.htm…
odyssey7 · 2024-09-12
Python is expressly designed to be non-functional. Guido van Rossum believed that the paradigm for the language should instead be “pythonic.” [1] [1] http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.htm…
pxc · 2024-08-16
> Then I tried some Fibonacci with tail recursion and surprisingly that worked too. I'm impressed, because often when people reimplement the Python interpreter they get those wrong. Huh? I thought Python didn't have TCO anyway. Guido had a whole blog post about why it supposedly doesn't belong in Python: https://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.ht…
htofuawfs · 2024-06-23
This is correct, however JS/Python pundits expect a stack metaphor when debugging even with an iterative process which can execute in constant space. This leaves us with trampolines as Guido prescribes [1]. [1]: https://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.htm…
imjonse · 2023-12-31
Related: Guido van Rossum's argument for why there is no TCO in Python. https://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.htm…
hendrikrassmann · 2023-01-08
I think the true goal is to bully Guido van Rossum into putting it into python. (See his reasons to not include it here: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.htm…
busterarm · 2022-07-20
We're talking about Lisp in Python here. Python itself famously[1,2] refuses to have TCO. 1: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.htm… 2: http://neopythonic.blogspot.com/2009/04/final-words-on-tail-calls.html
tyingq · 2021-06-18
Guido van Rossum's answer, of course with Python: http://neopythonic.blogspot.com/2008/10/sorting-million-32-bit-integer… It sounds like "break up into smaller sorted sets, then do a merge sort". Does the Google interview question allow for temp file storage?
kbumsik · 2018-09-28
> outright denial of any attempt at TCO because "Guido doesn't like recursion". No, don’t ignore problems of TCO by saying “guys don’t like functional programimg”. Guido cleary states why he doesn’t like it: [1]. Even though TCO is one of the ES6 standard, TCO also is largely denied by JS implementors (Firefox, Chrome, and Edge devs) because of the similar reasons. As a result, Safari is the only browser that supports TCO. [2][3] And Rust team is not eager to introduce TCO [4]. [1]: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.htm… [2]: https://www.chromestatus.com/feature/5516876633341952 [3]: https://github.com/kangax/compat-table/issues/819 [4]: https://github.com/rust-lang/rfcs/pull/1888
nullp0tr · 2018-03-17
It's actually not likely at ALL. Guido van Rossum said[0] on multiple occasions that it's un-pythonic and it won't happen. Edit: I didn't see shakna's comment. [0] http://neopythonic.blogspot.de/2009/04/tail-recursion-elimination.html…
shakna · 2018-03-17
Would it? My impression is that Guido is fairly against any such thing occurring [0]. > So let me defend my position (which is that I don't want TRE in the language). If you want a short answer, it's simply unpythonic. [0] http://neopythonic.blogspot.com.au/2009/04/tail-recursion-elimination.…
koltaggar · 2017-02-09
I like to think back to this post when I feel similar to the OP: http://neopythonic.blogspot.com/2016/04/kings-day-speech.html?m=1
pmontra · 2017-01-09
Coming from Ruby it's easier to use map, because it's what Ruby's standard library offers. However comprehensions are not that harder when one finally decides to understand how they work. Not as readable as map() IMHO. Example: Ruby [1, 2, 3].map {|x| x*x} # object.method(args) vs Python [x*x for x in [1, 2, 3]] where we have the function first, then the definition of the variable, then the data. This is the opposite of the object.method OO notation and using a variable before defining it is not what we usually do. But it's almost the usual mathematical notation "for i in set do f(i)" with the function at the beginning. Not a big deal. About a problem raised in a comment of the post (which is from 2009): this is Guido (2009) about the lack of tail call optimization in Python http://neopythonic.blogspot.it/2009/04/tail-recursion-elimination.html
AnkhMorporkian · 2015-03-16
Here's a link from Guido's blog back in '08 why he explains why he rejected a proposal on removing explicit self from the language. I feel he's more qualified to argue this than I. http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-stay.…
odonnellryan · 2014-03-08
For TRE: http://neopythonic.blogspot.com/2009/04/tail-recursion-elimination.htm… For the GIL, there are alternative implementations of Python (Jython, IronPython, etc.)
pak · 2014-01-04
It's not flamewar material. GVR himself has acknowledged everything (edit in response to @EdwardDiego: most of what) I said. (http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-stay.… The main contention holding back GVR and 3.1 from fixing this once and for all is that decorators currently need to manipulate the explicit self. From my perspective, it seems like Python decorators are [ab]used to reimplement basic features in other OOP systems, like class methods, and there are elegant ways of getting around this given a shift in certain concepts (like class << self in Ruby). It's odd to me that they were willing to break so much code with 3.0 (by "fixing" strings and Unicode) but a couple decorators held this one back.
Vaskivo · 2013-10-31
The problem is not that there is a hardcoded limit. Python just isn't suited for heavy recursion. As for tail-call optimization, here's Guido's opinion (which I agree): http://neopythonic.blogspot.pt/2009/04/tail-recursion-elimination.html

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close