in reply to Use globals or pass around everything under the sun?
(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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Use globals or pass around everything under the sun?
by demerphq (Chancellor) on Dec 05, 2001 at 16:54 UTC | |
by dragonchild (Archbishop) on Dec 05, 2001 at 18:34 UTC |