3 ms·
Why do you want Gotos? There is a small set of problems that is best solved by Gotos and even those can be solved with a less error prone method.
by RandallBrown 13y ago
Why do you want Gotos? There is a small set of problems that is best solved by Gotos and even those can be solved with a less error prone method.
- jules 13y agoAsm.js is a target language for compilers. That small set of problems that are best solved by gotos includes target languages for compilers.
- pcwalton 13y agoThe Relooper solves this problem for compilers, and it is extremely effective in practice. Besides, you can always solve the lack of goto with code duplication, with no loss in performance.
- jules 13y agoExcept code duplication destroys performance because the instruction cache isn't infinite. I think we can agree that the relooper isn't the optimal solution to this problem...it's a compromise that works pretty well, but its a compromise nonetheless. It also means that you need to involve the LLVM toolchain anyway, just like in pnacl. I don't know if pnacl is a better solution or asm.js, but what I do know is that both are compromise and both have advantages and disadvantages.
- deleted 13y ago[deleted]