Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Am 17.07.2018 um 04:48 schrieb Ryan Joseph: On Jul 16, 2018, at 7:02 AM, Sven Barth via fpc-pascal wrote: Might come, though not in that way (take your example: what if you pass the instance to some other code that stores it beyond the life time of the function) That’s what you guys said

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Am 16.07.2018 um 23:14 schrieb R0b0t1: On Mon, Jul 16, 2018 at 3:28 PM, Sven Barth via fpc-pascal wrote: Am 16.07.2018 um 19:55 schrieb R0b0t1: - Try except finally blocks I can support this one, I am surprised it is not already supported. Wasn't this mentioned in another recent thread as

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Ryan Joseph
> On Jul 16, 2018, at 1:27 PM, Marco van de Voort wrote: > >> But you don't necessarily know that the function you call does that (think >> third party code). And people *will* use this and don't think about the >> consequences. So a system with automatic reference counting is safer and >>

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Ryan Joseph
> On Jul 16, 2018, at 11:55 AM, R0b0t1 wrote: > > Declarations inside blocks I am unable to support. Declarations as > loops I *might* be able to support, but once you go from a C-like > language to Pascal and get used to predeclaring variables it starts to > become nice. You don't have to

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Ryan Joseph
> On Jul 16, 2018, at 7:02 AM, Sven Barth via fpc-pascal > wrote: > > Might come, though not in that way (take your example: what if you pass the > instance to some other code that stores it beyond the life time of the > function) That’s what you guys said about my awesome “stack alias”

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Ryan Joseph
> On Jul 16, 2018, at 8:27 AM, Santiago A. wrote: > >> - Autofree pointers >> >> Might come, though not in that way (take your example: what if you pass the >> instance to some other code that stores it beyond the life time of the >> function) > In such cases, you don't declare it "auto".

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Ralf Quint
On 7/16/2018 8:36 AM, Anthony Walter wrote: To the OP: For the sake of brevity, my vote is simply "no" to all your suggestions. +1 --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ___

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread R0b0t1
On Mon, Jul 16, 2018 at 3:28 PM, Sven Barth via fpc-pascal wrote: > Am 16.07.2018 um 19:55 schrieb R0b0t1: >> >> >>> - Try except finally blocks >> >> I can support this one, I am surprised it is not already supported. >> Wasn't this mentioned in another recent thread as existing? Does it >>

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Am 16.07.2018 um 19:55 schrieb R0b0t1: - Try except finally blocks I can support this one, I am surprised it is not already supported. Wasn't this mentioned in another recent thread as existing? Does it exist in at least Delphi mode? This is not supported and the last time it was discussed

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Marco van de Voort
In our previous episode, Sven Barth via fpc-pascal said: > > function) > > > > In such cases, you don't declare it "auto". Just as you don't free a > > pointer in the function you declare it if you pass the instance to another > > code that stores it beyond the life time of the function > > > >

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Santiago A. schrieb am Mo., 16. Juli 2018, 16:27: > El 16/07/2018 a las 15:02, Sven Barth via fpc-pascal escribió: > > Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: > >> I have some suggestions of change to freepascal syntax, just to debate >> >> (All are backward compatible) >> >> -

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Martin
On 16/07/2018 16:46, Santiago A. wrote: El 16/07/2018 a las 13:59, Michael Van Canneyt escribió: But declaring variables inside code blocks makes for really bad readability and - worse - possibly error prone code. What to do with scope rules ? Var   C : integer; begin   C:=1; // C is

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Santiago A.
El 16/07/2018 a las 13:59, Michael Van Canneyt escribió: On Mon, 16 Jul 2018, Santiago A. wrote: I have some suggestions of change to freepascal syntax, just to debate (All are backward compatible) - Declaring variables inside blocks, and loop variables - Autofree pointers - Try except

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Santiago A.
El 16/07/2018 a las 15:02, Sven Barth via fpc-pascal escribió: Santiago A. mailto:s...@ciberpiula.net>> schrieb am Mo., 16. Juli 2018, 13:41: I have some suggestions of change to freepascal syntax, just to debate (All are backward compatible) - Declaring variables inside blocks,

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Sven Barth via fpc-pascal
Santiago A. schrieb am Mo., 16. Juli 2018, 13:41: > I have some suggestions of change to freepascal syntax, just to debate > > (All are backward compatible) > > - Declaring variables inside blocks, and loop variables > -> reduces readability -> no interest - Autofree pointers > Might come,

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Michael Van Canneyt
On Mon, 16 Jul 2018, Santiago A. wrote: I have some suggestions of change to freepascal syntax, just to debate (All are backward compatible) - Declaring variables inside blocks, and loop variables - Autofree pointers - Try except finally blocks - Private declarations in implementation some

Re: [fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Michael Fuchs
Am 16.07.2018 um 13:40 schrieb Santiago A.: > for var i:integer:=1 to 100 do >    begin >   <...> >    end; What is the benefit? Poorer readability? g Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Syntax changes suggestions

2018-07-16 Thread Santiago A.
I have some suggestions of change to freepascal syntax, just to debate (All are backward compatible) - Declaring variables inside blocks, and loop variables - Autofree pointers - Try except finally blocks - Private declarations in implementation some of them can be found in

Re: [fpc-pascal] Loss of precision when using math.Max()

2018-07-16 Thread Martok
Am 14.07.2018 um 13:42 schrieb Florian Klämpfl: >> Still, the Delphi(32) compiler always works with Extended precision at >> compile >> time. See >> : >> "If constantExpression is a real, its type is Extended" -