5 ms·
A transform or heuristic must be developed so that naive recursion can be trivially unrolled into a loop (or state machine in cases of trees and graphs). Tail r
by ampdepolymerase 5y ago
A transform or heuristic must be developed so that naive recursion can be trivially unrolled into a loop (or state machine in cases of trees and graphs). Tail recursion is simply too tricky to reason through for complex logic unless you enjoy doing induction proofs.
- aaron-santos 5y agoI have been pining for a first-class language support for recursion schemes after learning and using them. Supplanting naive recursion with structured recursion would be an interesting move for a language. Does it have as much potential as structured programming?
- joe_the_user 5y agoHeadline from 2031: When the 'functional for-loop' along with 'mutable but immutable variables' were created, pure functional programming was finally made available for the masses.
- themulticaster 5y agoDo you mean proving the termination of a recursive function in general? In that case: After dabbling in a Isabelle/HOL for a while I can assure you that proving termination is the easy part. In other words: In 99 % of all cases termination can be proven automatically. Also, there's nothing scary about induction proofs.