(You will be using references to hashes, not the hashes themselves, right?)
You are correct in that passing in tons of variables will make the code cleaner. You have an interface between the main program and the modules.
As for the other programmer's thoughts, he's probably right. But, he also suffers from premature optimization. Is passing the variables around causing a noticeable slowdown? If it isn't, then there's nothing to optimize!
My suggestion would be to try them both.
What's that you say? Too much work? Your implementation is too tightly tied to your interface? Sounds like you've got work ahead of you. :-)
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
In reply to Re: Use globals or pass around everything under the sun?
by dragonchild
in thread Use globals or pass around everything under the sun?
by greywolf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |