Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
colanderman
14y ago
0 comments
Save
Share
Umm, I find the
opposite
to be true. By
always
declaring variables where I use them (notably in for loops), I avoid accidentally reusing a variable I used elsewhere.
0 comments
2 comments · 1 top-level
top
newest
oldest
gujk
14y ago
· 1 in thread
That is a special case. Loop headers should be considered the top of scope blocks in C. I don't know why the language designers didn't do that.
JoshTriplett
14y ago
They did, in C99.
j
/
k
navigate · click thread line to collapse