3 ms·
Also, it acts as a declaration of intent and makes the data dependencies in a function more explicit. If I declare a variable in the middle of a function, I am
by bluetomcat 10y ago
Also, it acts as a declaration of intent and makes the data dependencies in a function more explicit.
If I declare a variable in the middle of a function, I am declaring intent that this variable shouldn't be used in the first half of the function – maybe the data it is supposed to hold cannot be available at that point.