3 ms·
I think that TCO (and similar optimisations) are a bane to most junior developers. I vividly remember pulling my hair out when trying to single step through op
by mikekchar 9y ago
I think that TCO (and similar optimisations) are a bane to most junior developers. I vividly remember pulling my hair out when trying to single step through optimised C++ code early in my career. But in my experience, all good developers come to this point where they realise -- Hey, I don't need to single step through this code. I can read it and understand what it is supposed to do. These days, with the popularity of techniques like unit testing, debuggers are not really necessary. I've spent the last 4 1/2 years writing ruby and JS code and I don't even know how to use the various debuggers -- never needed to.
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.