...the idea that TRE is merely an optimization, which each Python implementation
can choose to implement or not, is wrong. Once tail recursion elimination
exists, developers will start writing code that depends on it, and their code
won't run on implementations that don't provide it.
Someone should tell this to the amateurs over at GCC: https://godbolt.org/z/97s5afhsqand Clang: https://godbolt.org/z/v384noWjq
and Microsoft: https://godbolt.org/z/Wr5zrWT84
and Intel: https://godbolt.org/z/5E7Mavf7h
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.