• Redkey
    link
    fedilink
    arrow-up
    4
    ·
    11 hours ago

    Tail recursion in particular is usually just turned back into a loop at the compiler, and typical modern architectures implement a call stack at the hardware level, which allows you to do limited-depth recursion, but breaks like in OP if you try to go too deep.

    Yes, in my experience this is what the term “recursion” means in a programming context; it doesn’t usually refer to a mathematical ideal. That was what tripped me up.