In my opinion, one of the worst things you can do with respect to subroutines is allow them to accept values through broader-scope "osmosis". My opinion is that all subroutine variables should be lexically scoped to the boundries of the subroutine.Huh?!? That's exactly what a closure does. And closures are useful!
Update: I hadn't noticed you mention closures yourself. I apologize. But in any case some caution is required IMHO before stating such a claim as the above. I.e. I wouldn't talk about "one of the worst things you can do...", but of "you must pay a lot of attention when you...", instead.
In reply to Re^2: Ghostly subroutine variables haunting me in subsequent calls
by blazar
in thread Ghostly subroutine variables haunting me in subsequent calls
by moonunit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |