[fpc-devel] Patches

Adem listmember at letterboxes.org
Thu Sep 30 21:00:33 CEST 2010

  On 2010-09-30 21:21, Andrew Brunner wrote:
> 2010/9/30 Adem<listmember at letterboxes.org>:
>>>> It is only more logical/sensible to bring together all these
>>>>   one-instance global objects into a one-instance global object, instead of
>>>> having them scattered all around the place.
>>> I hope you are joking ...
>> I have read the above sentence (of mine) a few times over; and I seriously
>> cannot see why I should be expected to be joking.
>> Could someone tell me what advantage there can ever be in/of having global
>> variables scattered all around the place.
> Well, global variables are going to be all over the place and will be
> declared in the scope of the unit where they are established.
So, from what you're saying, I am supposed to think that it is better to 
declare global variables in 460+ unit files in the compiler directory alone.
> It establishes their "belonging" in the unit/module in which they are/were declared :-)
> I think that the assertion of taking variables (just because they are global) and placing them in one unit file is indeed funny.
I'll remember this joke when I am writing the next Pascal code and 
declare my variables not at the top of each class/routine but right 
where they are needed and all over the place ;)



More information about the fpc-devel mailing list