Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative tail-call optimisation decorator #30

Closed
keleshev opened this issue Apr 7, 2013 · 2 comments
Closed

Alternative tail-call optimisation decorator #30

keleshev opened this issue Apr 7, 2013 · 2 comments

Comments

@keleshev
Copy link

keleshev commented Apr 7, 2013

There is an interesting implementation of tail-call optimisation decorator, which could be provided as an alternative to fn.recur.tco:

http://code.activestate.com/recipes/474088-tail-call-optimization-decorator/

It allows for more readable code, but has a speed penalty because it is implemented by raising exception on each recursion.

@aitjcize
Copy link
Contributor

+1 for this. BTW, is this project dead?

@kachayev
Copy link
Owner

@halst Personally I don't like any manual manipulation with _getframe etc. It always leads to magically fragile side-effects that's hard to find/debug/interop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants