in reply to A cleaner way of scoping variables

My solution is to start putting all code into functions early, and then break out subfunctions whenever it makes sense. That way random code is always in a reasonably small lexical scope, and I don't have to care much if a random lexical has a slightly larger scope than I'd ideally want.

Replies are listed 'Best First'.
Re^2: A cleaner way of scoping variables
by bradcathey (Prior) on Aug 09, 2004 at 22:00 UTC
    Thanks tilly, I'll file that under "good practices." Cheers.

    —Brad
    "Don't ever take a fence down until you know the reason it was put up. " G. K. Chesterton