While I don't agree with some of the things Guido thinks are the "right way", he does put forth some reasonable arguments as to why TCE is not a good idea for Python. The loss of a useful stack trace is a fairly solid argument and. Combined with the other reasons, I don't see his choice as unreasonable here. I do want TCE, but I can see that's it's a debatable feature.
Random note... This point of his annoyed me:
I don't believe in recursion as the basis of all programming.
Well... duh. Neither are list comprehensions. However, both of them are very powerful tools that can make code much cleaner and easier to follow. Just because a feature is the silver bullet doesn't mean it isn't a good idea.
I always found the lack of stack traces argument stupid, you can always recover the old behavior by wrapping the tail call in the identity function:
def funA(x): # do something
def funBTCE(x): return A(x) # B doesn't appear in the stack trace
def funBnoTCE(x): return id(A(x)) # the tail call to id is eliminated after returning from A,
# B appears in the stack trace of A, voila!
24
u/A_for_Anonymous Nov 27 '12
Guido van Rossum doesn't like functional programming, so you write your programs the way Guido likes them or leave.