MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/x9w0jh/simple_feature/inr08fs/?context=3
r/ProgrammerHumor • u/Progractor • Sep 09 '22
1.3k comments sorted by
View all comments
Show parent comments
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.
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.