Re: Globals In 4gl
Posted in 1998
Art S. Kagel wrote: > ... > > Therefore experienced 4GL programmers tend to avoid passing too much as > parameters, relying rather on module and global variables, because of > the high cost of pushing and poping all of the data represented by all > of those arguments. > > So the balance is between run-time speed and maintenance costs. Not an > easy choice, but, few managers would agree to programs that were > noticable slower just because they are easier and cheeper to maintain. > Hence the, particularly unflattering and non-helpful, comments of the > original developers. I think the balance is changing. Previously (years ago) there was no question but to use global variables extensively for performance reasons. Today you will not, in most cases, notice any performance difference. In the future the balance will continue to move in the same direction. The argument above can be turned to "few managers would agree to spending money on huge maintenance costs instead of a simple hardware upgrade". It's the reason why Java will eventually proliferate (I think :). There will of course be justifiable cases where globals should be used but IMHO they should be considered as exceptions. Remember, we're coding systems today that will be used on machines of tomorrow. Best wishes, ---------------------------------------------------------------------- John H. Frantz Power-4gl: Extending Informix-4gl john@rl.is http://www.rl.is/~john/pow4gl.html