12 ms·
> As we all know, because these widely-used compilers treat TCO as an optimization, C programmers have become problematically insistent on using tail recursion
by grumpyprole 2y ago
> As we all know, because these widely-used compilers treat TCO as an optimization, C programmers have become problematically insistent on using tail recursion instead of loops.
I think you are misunderstanding. To put it another way: because, in C, the optimisation is not guaranteed, recursion is rarely used in practice. This is a shame as many problems do have a recursive structure and are best solved using recursion. It's probably the best decision for C, but not for a high-level language.
- deleted 2y ago[deleted]