in reply to Re (tilly) 2: Use globals or pass around everything under the sun?
in thread Use globals or pass around everything under the sun?
It's probably just me, but I find exporting variables for configuration purposes just as bad as a global variable. I hate polluting namespaces except for CONSTANTS, even when the coder asks for it, and always fully qualify all non-method subroutine calls. Paranoid? Maybe, but I think it's made my code easier to understand down the road.
As you said, it's basically the same thing as exporting a variable but with an extremely lightweight wrapper around it that explicitly tells you (the maintainer twelve months down the road after the original programmer has left) there's only one configuration object out there. TMTOWTDI.
Chris
M-x auto-bs-mode
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 4: Use globals or pass around everything under the sun?
by tilly (Archbishop) on Dec 04, 2001 at 19:32 UTC | |
by lachoy (Parson) on Dec 04, 2001 at 20:29 UTC | |
by tilly (Archbishop) on Dec 04, 2001 at 21:19 UTC | |
|
Re: Re: Re (tilly) 2: Use globals or pass around everything under the sun?
by dragonchild (Archbishop) on Dec 04, 2001 at 18:48 UTC |