
On Dec 21, 2019, at 15:59, Chris Angelico <rosuav@gmail.com> wrote:
It's not just about performance. It's also about expressing a concept. A tail call IS a call, and the correct way to write this is to do stuff, and then do whatever a call does.
Looking at languages that try to express similar semantics without just aping C, Swift and Go both have a fallthrough statement that jumps to the start of the next case in a switch. This is similar: Once you think about it, an orif is just like an elif whose previous block ended in a fallthrough. But I’m not sure it actually reads the same. A fallthrough says “tail call does this stuff, and then does the stuff from the next (call) case”. An orif says “call, or also tail call which did some other stuff, does this stuff.” It seems backward to think of it that way.