Re:Exotic Programming Ideas, Part 3: Effect Systems
by tomp on Sunday November 22, 2020 @12:47PM
(#25179357)
I never understood this one. I mean obviously a kind compiler should warn you against using
and
but in general, I don’t find distinction between “this infinite loop terminates” (e.g. an event loop) and “this code obviously terminates but not in the lifetime of this universe” (e.g. computing Ackermann(5)) to be that useful.
[ Parent
| on HN ]
Re:Exotic Programming Ideas, Part 3: Effect Systems
by creata on Sunday November 22, 2020 @01:01PM
(#25179461)
It's primarily useful for theorem proving, where a nonterminating argument corresponds to circular or otherwise unfounded reasoning.
It's also useful because, in practice, we don't accidentally write code that "obviously terminates but not in the lifetime of this universe" as often as we accidentally write nonterminating code, so a lot of mistakes can still be caught by termination checking.