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

Tail call optimization to avoid crazy recursion depths #20

Open
bauersimon opened this issue Aug 15, 2023 · 0 comments
Open

Tail call optimization to avoid crazy recursion depths #20

bauersimon opened this issue Aug 15, 2023 · 0 comments

Comments

@bauersimon
Copy link

While working with WAL I implemented a recursive function (in functional programming manner) that handles a long list (i.e. indices returned by WAL's find operation). I quickly reached a maximum recursion depth, which likely stems from the interpreter loop of WAL. Even increasing this number in an imported python script using sys. setrecursionlimit did not help (eventually my program did just crash silently).

Many functional languages employ "tail call optimization" to avoid indefinitely clogging the stack. That would be a wonderful thing for WAL as well.

I understand that this might not be top priority 😅 but anyway leaving it here as a suggestion.

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

1 participant