Explain to me what the big deal with tail call optimization is and why Python needs it

前端 未结 4 935
夕颜
夕颜 2021-02-07 03:39

So apparently, there\'s been a big brouhaha over whether or not Python needs tail call optimization. This came to a head when someone shipped Guido a copy of SICP because he di

4条回答
  •  伪装坚强ぢ
    2021-02-07 03:58

    Guido recognized in a follow up post that TCO allowed a cleaner the implementation of state machine as a collection of functions recursively calling each other. However in the same post he proposes an alternative equally cleaner solution without TCO.

提交回复
热议问题