3 ms·
But they'd complain about the opposite -- for example if the program were an external-event-driven state automaton.
by jhgb 5y ago
But they'd complain about the opposite -- for example if the program were an external-event-driven state automaton.
- cryptonector 5y agoTCO does not do the opposite. TCO helps avoid stack exhaustion without introducing new faults. TCO might cause your program to avoid one stack exhaustion fault only to reveal a different fault (possibly a different stack exhaustion fault). This is not a semantics change. And it's not a bug either.
- jhgb 5y agoWhat do you mean by "reveal a different fault"? A program with an indefinite amount of tail calls does not have "a fault".
- cryptonector 5y agoIf you have a program that fails due to stack exhaustion, but fixing it by enabling TCO causes it to run longer and therefore run into some other problem...
- jhgb 5y agoBut that's not a fault in the program. That's a fault in its execution environment revealed by the program.