Tail Recursion is a Brain Hack Not a Compiler Hack

A few months ago this last-in-a-thread-of-posts generated a lot of buzz. In it, the creator of the Python programming language shared his views about how tail-recursion does not belong in Python. The only problem with the post(s) was that he, admittedly, did not understand tail-recursion. This course of events, the blog posts, comments, and aftermath, were interesting in what they revealed:

  1. How one person can affect how so many think
  2. How tail-recursion is so misunderstood within the developer community

The first, of course, is the prerogative of any BDFL. It is sort of fascinating how the edict that he set forth is enough to convince thousands and thousands of Pythonistas that tail-recursion is flawed and unnecessary (that is power!). That is sad, but, it is a privilege of the role. The interesting part is the impact of never understanding tail-recursion (#2): it removes an entire style of abstraction from the developers toolbox.
Here are 3 works that explain that style:

  1. LAMBDA: The Ultimate Imperative
  2. LAMBDA: The Ultimate GOTO
  3. Automata via Macros

I haven’t found any other resources than those and Jon’s post here (see the last section) that touch upon the style. Do you know of any others?

Leave a Reply

Your email address will not be published. Required fields are marked *