logoalt Hacker News

afioriyesterday at 11:28 AM1 replyview on HN

Just like many languages have annotations for inlining functions they could have annotations for tco. From an usability pov i would like annotations for must, must not, should, and should not. Where the "must" versions error if the compiler can't do the optimization


Replies

a57721yesterday at 2:11 PM

Scala and Kotlin have 'tailrec' annotation/modifier, though not as sophisticated as you describe.