20 years of C code, and I never knew its block scope rather than function scope. Now need to forget this new knowledge and return to sanity
yeah i'm sure your hat is just that color because it got smudged from bumping against your halo
-
-
I'll have you know I was once an altar boy!
-
well, much is explained
End of conversation
New conversation -
-
-
but, seriously, what *ARE* the civilian applications?
-
if(condition) { int some_damn_thing_i_only_care_about_in_this_case = expensive(); do_thing(…); } else { whatevs(); }
-
so, you save 32/64 bits, at the cost of extra typing and the possibility that future readers of your code will misunderstand it?
-
Tweet unavailable
-
but are the bits saved? Is there a new stack frame for the new block? Or is scope just enforced regardless?
-
guess it depends on how clever your compiler is, don't see any reason they couldn't be but implementations ¯\_(ツ)_/¯
-
I worry about all this effort to replace programmer skill with 'clever' compilers. How long before gcc is self-aware?
-
in what fashion have you demonstrated that it presently is not
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.