Skip to content

Add some missing tailrec annotations for clarity #4280

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

Closed
wants to merge 1 commit into from

Conversation

Blaisorblade
Copy link
Contributor

Clarify these methods are tail-recursive (and ensure they are).

@allanrenucci
Copy link
Contributor

I will quote Martin here:

Add a @tailrec only if it is important that the method is in fact tail-recursive. Either it is super-performance critical or can potentially recurse deeply. Do not add @tailrec just because the method happens to be tail recursive.

Closing. Feel free to reopen if you disagree

@allanrenucci allanrenucci removed their request for review April 11, 2018 19:46
@Blaisorblade Blaisorblade deleted the add-tailrec branch April 11, 2018 21:01
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

Successfully merging this pull request may close these issues.

2 participants