zlacker

[parent] [thread] 0 comments
1. crypto+(OP)[view] [source] 2024-10-15 14:58:38
The whole thing about distinguishing functions that yield once from all other functions is pretty clever. Reminds me of how in Icon a `return` is a C-like return that unwinds the stack while `suspend` is more like calling a continuation with the yielded value. In the old Icon-to-C compiler that's exactly how `return` and `suspend` worked. But Icon does not analyze function ("procedure") bodies to see if they only return, so the `return`-unwinds optimization is a run-time one. Whereas Rama does a compile-time optimization, which makes a lot of sense.
[go to top]