So I'm with you. Just give me TCO every single time -- or give it to me never. Optimising it by hand is not that hard, and it's what most non-functional programmers do most of the time anyway. You'll see loops where recursion would be clearer, but then when you look at it hard you'll realise that it's just the TCO optimised version of the same code.
Otherwise, you may decide to just use recursion everywhere and then your stack overflows when your N is bigger than expected.
When in doubt, don't use recursion and don't expect that you get TCO.
If I write web apps, as far as I'm concerned, my platform is V8, Whatevermonkey, Trident and every other hypothetical javascript engine out there, any of which might or might not support TCO under different circumstances.
> When in doubt, don't use recursion and don't expect that you get TCO.
I think relying on TCO is always a bad idea, exactly because you can't be sure your platform supports it. But STC doesn't change that. You can't expect the platform to support tail calls because you did some magic incantations.
On the other hand, it doesn't make sense to me to forbid tail calls either. If you know your recursive code will work without TCO, it will work with TCO, too.
As program correctness is concerned, tail calls and recursive calls should behave exactly the same (except stack use), so going by correctness alone, either the choice doesn't matter at all or tail calls are preferable. So the logical thing to do would be to always use tail calls.
The post goes on to list a number of disadvantages, but those seem to be either debugging concerns or platform-specific implementation concerns.
The former doesn't seem to be something that should be solved in the code - the document itself lists a number of solutions. The latter is not something that I as developer could judge as I likely don't have knowledge about the specific implementation of the platform the code is running on (if I know the platform in advance at all)
So it seems to me, STC shifts the problem of deciding to the developer even though the developer has no good tools to actually solve it.