3 ms·
When you have a set of functions that may recourse into each other, you can convert them into a iterative one by doing a `while cond {switch function_selector {
by marcosdumay 4y ago
When you have a set of functions that may recourse into each other, you can convert them into a iterative one by doing a `while cond {switch function_selector {..}}` block.
It's an ugly piece of code, but because of parsers, there is a huge amount of know how on it.
- light_hue_1 4y agoYou really can't. For example, what if those functions are in different modules or libraries? Tail calls are still supposed to work.
- marcosdumay 4y agoIf they are statically linked, it's not a problem, and since AFAIK wasm doesn't support dynamic linking, the only problem is on crossing security boundaries, that will be probably kept unsolved anyway. (IMO, this one is better left unsolved, it's to complicated a problem to require for interoperability.)