3 ms·
People have written decorators that do tail call optimization, e.g. https://code.activestate.com/recipes/474088-tail-call-optimization-decorator/ https://code.a
by version_five 5y ago
People have written decorators that do tail call optimization, e.g. https://code.activestate.com/recipes/474088-tail-call-optimization-decorator/ https://code.activestate.com/recipes/474088-tail-call-optimi...
I think the "pythonic" way to handle it though is to not use recursion in the first place, and write the loops into your functions directly
- Qem 5y agoRelated, how the Smalltalks pull it with no need for tail call optimization: https://stackoverflow.com/questions/37089768/does-pharo-provide-tail-call-optimisation https://stackoverflow.com/questions/37089768/does-pharo-prov...