listmember at letterboxes.org
Thu Sep 30 19:12:13 CEST 2010
On 2010-09-30 19:39, Michael Van Canneyt wrote:
> If you want to move the *global variables* (as in: unit scope)
> CExportLib,ExportLib to globals, you must add export to the globals unit.
Not only do I think they should be moved to globals.pas, I also think
they should be fields/properties/methods of, say, TFCPGlobalSettings class.
Which, in turn, should be used in the compiler object as a field/property.
Doing that does not increase complexity.
Just the opposite: the code becomes more decipherable and hence more robust.
BTW, removing all these
CExportLib : array[tsystem] of TExportLibClass;
ExportLib : TExportLib;
procedure RegisterExport(t: tsystem; c: TExportLibClass);
from export.pas, also enables us to remove 'globals' from the 'uses' of
export.pas --which means less convolution to me.
What I would like to know is why seem to think this is a bad idea?
Further, I think the NoGlobals brach is a very good starting point
before moving on to multiple front-ends etc.
More information about the fpc-devel