3 ms·
You're not only undeservedly dismissing very salient high-level points but also just completely missing the low-level ones. Even ignoring build times and lookin
by dataflow 7mo ago
You're not only undeservedly dismissing very salient high-level points but also just completely missing the low-level ones. Even ignoring build times and looking only at execution times (and btw it's not just time that matters here), even function calls are not always zero-cost. For multiple reasons, some of which differ across compilers more than others.
Nobody is concluding you shouldn't write functions either.
- adev_ 7mo agoThen we disagree. > (and btw it's not just time that matters here) My remark is still valid. Even considering memory space and cognitive complexity. > even function calls are not always zero-cost. For multiple reasons, some of which differ across compilers more than others Divergence about the support of inlining in compiler implementation have nothing to do with the debate here. Some idiosyncrasy about C++ argument passing and lifetime might causes a cost in some specific scenario, still that is specific to C++. It still does invalid the concept of zero runtime cost for abstraction. As much as people like to dismiss it, Stepanov was right all along. > Nobody is concluding you shouldn't write functions either. Then, you will be surprised to learn that some 'devs' actually recommend exactly this and write guideline that minimize the number of function written. They tend to be from the same crowd that the one was describing before.