3 ms·
> Why is this different than any loop in C? or function without a return? Because it's non-local control flow. Did you just ignore my whole comment where I poi
by naasking 4y ago
> Why is this different than any loop in C? or function without a return?
Because it's non-local control flow. Did you just ignore my whole comment where I pointed out where cases like exit() unwinds the stack, invoking deferred block in each caller up the call chain back to the root? Does for/while do that?
- yazaddaruvala 4y agoI really did read it, I just really believe that your biases are clouding your critical thought about this. > invoking deferred block in each caller up the call chain back to the root Yes if the caller writes N defers in the same function or across M functions then the code will run N defers. Why is this any different than nesting N loops, in the same function or across M functions? It’ll still run N end of block control flow statements without them being “explicit”. At the end of the day “explicit” typically is really just a replacement for saying “familiar with the previous documentation, don’t change things”. Anyways, that’s all I can put into this conversation. Please just try to consider that you’re conflating familiarity with simplicity and leverage System 2 to really ask yourself if what you’re favoring is valuable to the group or just the NIMBY.
- naasking 4y agoI honestly can't summarize the extra runtime complexity any more clearly than I already have. The original poster was very clear about keeping the runtime complexity down for various well-motivated reasons. They are correct that if you want more runtime support for high-level features, then C is perhaps not the language for you.