Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Bart
On Thu, Apr 5, 2018 at 4:22 PM, Karoly Balogh (Charlie/SGR) wrote: > But again, it's zeroed out, not really "initialized". So for example if > you have a type with say, 5..7 value range, it will still contain zero > after start. Hence, uninitialized, therefore the

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Jonas Maebe
On 05/04/18 17:18, Michael Van Canneyt wrote: On Thu, 5 Apr 2018, Martok wrote: Am 05.04.2018 um 08:35 schrieb Michael Van Canneyt: If the compiler devs wanted, they could initialize every string with the '' constant, That is in fact the -gt option. I doubt -gt does something for managed

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Martok wrote: Am 05.04.2018 um 08:35 schrieb Michael Van Canneyt: If the compiler devs wanted, they could initialize every string with the '' constant, That is in fact the -gt option. I doubt -gt does something for managed types? Pascal states: do not assume that

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Sven Barth via fpc-devel
Martok schrieb am Do., 5. Apr. 2018, 16:29: > > From this rule, it follows that every variable must be explicitly > initialized [...] > > Be it with an assignment or an 'var a: type = someonstant;'. > ... for which the syntactic sugar was rejected not two weeks ago. >

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Martok
Am 05.04.2018 um 08:35 schrieb Michael Van Canneyt: > If the compiler devs wanted, they could initialize every string with the > '' constant, That is in fact the -gt option. > Pascal states: do not assume that variables are initialized. Corollary: there is no guarantee that "class operator

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Karoly Balogh (Charlie/SGR)
Hi, Just some technical background to this discussion, I don't care who documented what, I'm just stating how it works. :P On Thu, 5 Apr 2018, Ondrej Pokorny wrote: > >>> Now, it is also correct that the compiler developers are aware that > >>> many people rely on this implementation detail. >

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Ched
Hello, Le 05.04.2018 à 11:55, Marco van de Voort a écrit : In our previous episode, Alexander Klenin said: >> Allow me to yet again to single out this philosophy of strongly preferring abstract purity to concrete user experience. This is IMHO a significant contributing factor of Pascal

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Marco van de Voort
In our previous episode, Alexander Klenin said: > > Simple, straightforward. > > > Allow me to yet again to single out this philosophy of > strongly preferring abstract purity to concrete user experience. > This is IMHO a significant contributing factor of Pascal decline. No. Not having something

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Alexander Klenin wrote: On Thu, Apr 5, 2018 at 10:24 AM, Michael Van Canneyt 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

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Martin Schreiber
On Thursday 05 April 2018 12:47:27 Alexander Klenin wrote: > > Allow me to yet again to single out this philosophy of > strongly preferring abstract purity to concrete user experience. > This is IMHO a significant contributing factor of Pascal decline. > I would not argue this specific point

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Alexander Klenin
On Thu, Apr 5, 2018 at 10:24 AM, Michael Van Canneyt 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,

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Nikolai Zhubr
Hi, 05.04.2018 10:12, Ondrej Pokorny пишет: [...] 1.) Global variables are initialized. (Why is simple global variables initialization needed for internal bookkeeping of the compiler?) IIRC this was historically introduced by Borland (ages ago) because it was very cheap and easy to ask an OS

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Ondrej Pokorny wrote: On 05.04.2018 8:35, Michael Van Canneyt wrote: Now, it is also correct that the compiler developers are aware that many people rely on this implementation detail. Since when is documented behavior considered as "implementation detail"? This is not

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Ondrej Pokorny
On 05.04.2018 8:35, Michael Van Canneyt wrote: Now, it is also correct that the compiler developers are aware that many people rely on this implementation detail. Since when is documented behavior considered as "implementation detail"? This is not an implementation detail. It is in official

Re: [fpc-devel] Wrong docs: not initialized global variables

2018-04-05 Thread Michael Van Canneyt
On Thu, 5 Apr 2018, Ondrej Pokorny wrote: On 05.04.2018 0:34, Michael Van Canneyt wrote: What, because you do not agree ? No, because I didn't get any arguments against. You did, you just don't consider them valid. There are 2 narratives, and you choose to ignore the 2nd one. Now, it