3 ms·
It's extremely common. Recursion only blows up if your PL has fixed size stacks and no tail call elimination. There are plenty of languages which support both,
by duped 4y ago
It's extremely common.
Recursion only blows up if your PL has fixed size stacks and no tail call elimination. There are plenty of languages which support both, and recursion is safe.
Particularly with growable stacks, the alternative to recursion is to use something that has equivalent runtime characteristics as a growable stack (even making one explicitly). That's still using recursion, it's just explicit.
It is also used extensively in parsers and compilers. There's also recursive data structures, which are also extremely common.