Might as well have not been scoped to begin with, because it gets none of the benefits.
Not exactly, you can have two functions f and g which both have a local variable named x, and if f calls g, g won't clobber f's x. If x was truly global, it would get clobbered.
View all comments
Show parent comment
1
u/rwbarton Jul 26 '13
Not exactly, you can have two functions
fandgwhich both have a local variable namedx, and iffcallsg,gwon't clobberf'sx. Ifxwas truly global, it would get clobbered.