logoalt Hacker News

jimbob45today at 9:01 AM2 repliesview on HN

Someone on here had the neat idea of a “become” keyword replacing “return” when TCO is desired. I thought it was the obvious route forward and remain confused why I still haven’t seen it adopted.


Replies

Lorkkitoday at 9:24 AM

Rust has it as an experimental feature: https://doc.rust-lang.org/stable/std/keyword.become.html

Of course it's nowhere near a guarantee that it would land in the stable language, but it's still an opportunity to try it in practice.

beagle3today at 9:05 AM

Same here. (Except, following 1980’s BASIC, I always expected it to be called “chain”)