Re: [Python-Dev] Explicit Tail Calls

2007-10-13 Thread Greg Ewing
Shane Hathaway wrote: > I was aware of Guido's earlier rejections, but I figured the rejection > was due to the risky implicit optimization proposed by others. Perhaps > the objection is deeper than that; I suspect Guido specifically objects > to excessive use of recursion. As I recall, one of t

Re: [Python-Dev] Explicit Tail Calls

2007-10-12 Thread Shane Hathaway
Adam Olsen wrote: > Since they're not going to be accepted into python anyway, the > implementation is off-topic for python-dev. Please take them up > elsewhere (such as my offer to discuss in private.) I was aware of Guido's earlier rejections, but I figured the rejection was due to the risky im

Re: [Python-Dev] Explicit Tail Calls

2007-10-12 Thread Adam Olsen
On 10/12/07, Shane Hathaway <[EMAIL PROTECTED]> wrote: > Shane Hathaway wrote: > > Shane Hathaway wrote: > >> I'm interested in seeing a good way to write tail calls in Python. Some > >> algorithms are more readable when expressed using tail recursion. > > > > About ten seconds after I wrote the p

Re: [Python-Dev] Explicit Tail Calls

2007-10-12 Thread Shane Hathaway
Shane Hathaway wrote: > Shane Hathaway wrote: >> I'm interested in seeing a good way to write tail calls in Python. Some >> algorithms are more readable when expressed using tail recursion. > > About ten seconds after I wrote the previous message, I realized two things: > > - It's easy to write

Re: [Python-Dev] Explicit Tail Calls

2007-10-12 Thread Adam Olsen
On 10/12/07, Shane Hathaway <[EMAIL PROTECTED]> wrote: > Hello, > > I'm interested in seeing a good way to write tail calls in Python. Some > algorithms are more readable when expressed using tail recursion. > > I know tail call optimization has been discussed before [1], but I would > like to con

Re: [Python-Dev] Explicit Tail Calls

2007-10-12 Thread Shane Hathaway
Shane Hathaway wrote: > I'm interested in seeing a good way to write tail calls in Python. Some > algorithms are more readable when expressed using tail recursion. About ten seconds after I wrote the previous message, I realized two things: - It's easy to write "return Return" instead of "raise

[Python-Dev] Explicit Tail Calls

2007-10-12 Thread Shane Hathaway
Hello, I'm interested in seeing a good way to write tail calls in Python. Some algorithms are more readable when expressed using tail recursion. I know tail call optimization has been discussed before [1], but I would like to consider a different approach. The previous discussion centered on im