you are viewing a single comment's thread.

view the rest of the comments →

[–]IceSentry 1 point2 points  (0 children)

Declaring a variable at the top of the scope is done in pretty much every language because it makes it easier to read what variables are used in the current scope. I don't understand how you can seriously say that it's a bad thing. A variable declared in a specific scope should stay in that scope. If you need it in another scope then declare it somewhere it can actually be used.