[fpc-devel] Wrong docs: not initialized global variables
Michael Van Canneyt
michael at freepascal.org
Thu Apr 5 13:26:05 CEST 2018
On Thu, 5 Apr 2018, Alexander Klenin wrote:
> On Thu, Apr 5, 2018 at 10:24 AM, Michael Van Canneyt
> <michael at freepascal.org> wrote:
>>
>> You explained exactly why I think the delphi docs are wrong.
>>
>> If delphi wanted to do things correctly and consistently they would simply
>> say 'everything is initialized to 0'. Period.
>>
>> Simple, consistent, easy.
>>
>> The above is a kludge.
>>
>> The point of view of 'Pascal' is that you should consider every variable
>> uninitialized.
>>
>> Simple, straightforward.
>>
> Allow me to yet again to single out this philosophy of
> strongly preferring abstract purity to concrete user experience.
Stop:
I am not preferring anything.
I'm just pointing out that the current situation is a kludge, it is the
consequence of some ill-advised pragmatism on the part of
Borland/embarcadero/inprise/Codegear.
If it is decided to simply zero out *all* variables - which is a decision based
on a principle and as such an 'abstract purity' - you will not hear me complain.
(Why do you think I mentioned it in the first place ?)
Such a decision may well be beneficial for the user experience.
But until that time, the warning as issued by the compiler is correct,
consequent and in the philosphy of the language, and that is what the
discussion is about.
Michael.
More information about the fpc-devel
mailing list