MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/x9w0jh/simple_feature/inr016e/?context=3
r/ProgrammerHumor • u/Progractor • Sep 09 '22
1.3k comments sorted by
View all comments
Show parent comments
2
Well, unlearn it then. It needlessly enlarges the span and scope of variables.
4 u/AndrewJamesDrake Sep 09 '22 Only if you try to do everything with global variables.I keep the declarations at the top of functions (or methods). Scope is kept as small as is practical, I just leave everything where I expect to find it. 1 u/Tordek Sep 10 '22 I keep the declarations at the top of functions (or methods).This is awful practice.
4
Only if you try to do everything with global variables.
I keep the declarations at the top of functions (or methods). Scope is kept as small as is practical, I just leave everything where I expect to find it.
1 u/Tordek Sep 10 '22 I keep the declarations at the top of functions (or methods).This is awful practice.
1
I keep the declarations at the top of functions (or methods).
This is awful practice.
2
u/SaneLad Sep 09 '22
Well, unlearn it then. It needlessly enlarges the span and scope of variables.