Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Ondrej Pokorny
Am 20.02.19 um 21:33 schrieb Florian Klämpfl > Am 20.02.19 um 08:36 schrieb Paul van Helden: > As a big >/fan of the Pascal language, I'd rather break compatibility and see the /> >/language evolve than the stoic attitude of the core devs as seen on this /> >/list. / People could change this a

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread James via fpc-devel
Well, I asked for discussion, and it was given. Thank you all for your input. To be clear, although I *literally* wrote the words "non backwards compatible", I did not mean it. I should have said that there should be a new compiler mode to access new features. In Rust, there is the concept of "s

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Michael Schnell
>. For us inline variables is one of the most horrid if not *the* most horrid >thing Embarcadero could have done to Object Pascal. Can you tell us why ? (In C I often declare variables just before using them and I indeed would even like to do “for (int i = 0; i<10; i++) {a[i] = a[i+1];} ☺ -Mi

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Michael Schnell
> If Oxygene was open source and (CPU) native, Oxygen *is* CPU native (optionally). But not open source, and of course there are a lot more drawbacks regarding fpc/Lazarus. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://li

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread J. Gareth Moreton
On the contrary... I'm all for new features if they gel well with the language, although I try to research and theorise how they can benefit the compiler and the code it generates.  My current patches haven't been as well-received as I had hoped, possibly due to lack of documentation and provable

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Sven Barth via fpc-devel
Am Mi., 20. Feb. 2019, 20:45 hat gabor geschrieben: > W dniu 2019-02-16 o 23:37, Benito van der Zander pisze: > > So are inline variables coming soon? > > > http://blog.marcocantu.com/blog/2018-october-inline-variables-delphi.html > > Who cares ininline variables since we do not have dynamic pack

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Nikolai Zhubr
Hi, 20.02.2019 23:33, Florian Klämpfl: Am 20.02.19 um 08:36 schrieb Paul van Helden: > As a big fan of the Pascal language, I'd rather break compatibility and see the language evolve than the stoic attitude of the core devs as seen on this list. People could change this attitude by contribut

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Nikolai Zhubr
20.02.2019 21:28, Giuliano Colla: [...] Moreover, using a modern tool such as Lazarus, you never need to scroll 1000 lines to find a declaration: you just press alt+Up to go to the declaration of the symbol over the cursor, and Ctrl+H to go back to the line of code. It's a bit like car manufact

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Nikolai Zhubr
Hi, 20.02.2019 23:56, wkitt...@windstream.net: [...] How this example is different from e.g. using normally declared "I, J: Integer" and employing "J" as a loop variable? Wouldn't it do the same error anyway? i think he's pointing out the two instances of var I in the code... one at the top

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread wkitty42
On 2/20/19 1:28 PM, Giuliano Colla wrote: Keeping all declarations separated from code is just good programming practice. Mixing declaration and code is bad programming practice, IMO, and I appreciate Pascal for not supporting it. this falls in the same line as keeping business logic separate f

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread wkitty42
On 2/20/19 2:08 PM, Nikolai Zhubr wrote: 20.02.2019 18:24, Dimitrios Chr. Ioannidis via fpc-devel: [...]  I'd like to see an example how this is less safe. Well one of the answer in the Cantu blog has this ( which I changed to lets say a "real world" relative big function ) : How this exampl

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Florian Klämpfl
Am 20.02.19 um 08:36 schrieb Paul van Helden: > As a big fan of the Pascal language, I'd rather break compatibility and see the language evolve than the stoic attitude of the core devs as seen on this list. People could change this attitude by contributing to FPC. But very few do constantly

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Marcos Douglas B. Santos
On Wed, Feb 20, 2019 at 4:28 PM Nikolai Zhubr wrote: > > [...] > > On the other hand, I've been biten plenty by the already existing name > clashes like: > >with Button1 do >begin > Left := ClientWidth div 2; > . > > and here nothing can probably be done to help at compiler p

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Marcos Douglas B. Santos
On Wed, Feb 20, 2019 at 1:50 PM Kostas Michalopoulos wrote: > > > and Niklaus Wirth might not throw a curse in us. > > Considering we're talking about a dialect with three different > incompatible yet mostly overlapping object systems, i think the curse > has already been cast long long ago :-P.

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread gabor
W dniu 2019-02-16 o 23:37, Benito van der Zander pisze: So are inline variables coming soon? http://blog.marcocantu.com/blog/2018-october-inline-variables-delphi.html Who cares ininline variables since we do not have dynamic packages yet? Regards, Michał. __

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Nikolai Zhubr
Hi, 20.02.2019 21:28, Giuliano Colla: [...] I have just met such a situation: I ported from C++ to Pascal an algorithm for the computation of the kinematics of a Delta Robot, and I was badly bitten. In that case you are just dealing with X,Y,Z coordinates, and Theta0,Theta1,and Theta2 angles, and

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Martin Frb
On 20/02/2019 19:56, Nikolai Zhubr wrote: 2) Nested loops exist. If in the middle of such a 1000 line for-loop, I want to declare another loop, then I need to find a free identifier for that variable.  Today, I can do that by looking at the declaration on top of the procedure (and afaik dependi

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Ozz Nixon
* Just to note there is a choice - not pitching one is better just, there is someone doing it * There is a choice of course... built using FPC. I wrote ModernPascal. We do not focus on Windows support as much as other platforms FPC is available for. Per grammar, MP2 (current build) was designed to

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Nikolai Zhubr
Hi, 20.02.2019 18:24, Dimitrios Chr. Ioannidis via fpc-devel: [...] I'd like to see an example how this is less safe. Well one of the answer in the Cantu blog has this ( which I changed to lets say a "real world" relative big function ) : How this example is different from e.g. using normal

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Nikolai Zhubr
Hi, 20.02.2019 17:56, Martin Frb: 1) "for" (and other) loops with a long body also exist. So the problem is still there, if I encounter "i" in the middle of a This is correct. Inline declaration will not be able to solve all problems in the galaxy, it could just help to relieve some of them.

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Giuliano Colla
Il 20/02/2019 19:11, Nikolai Zhubr ha scritto: Now it is getting even more curious. Admittedly I don't use C too much (and C++ even less so, approximately never), maybe that is why I do not understand your reasoning. Could you maybe give an example of such problematic inline declaration and it

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Nikolai Zhubr
Hi Sven, 20.02.2019 16:51, Sven Barth via fpc-devel: [...] Pascal is a language where declaration and use of variables is separated. I can understand that a language can (and should) try to follow some aesthetic tradition (which, btw, has already been horribly broken many times, imho, althou

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Kostas Michalopoulos
> and Niklaus Wirth might not throw a curse in us. Considering we're talking about a dialect with three different incompatible yet mostly overlapping object systems, i think the curse has already been cast long long ago :-P. ___ fpc-devel maillist - fp

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Dimitrios Chr. Ioannidis via fpc-devel
Hi, Στις 20/2/2019 4:46 μ.μ., ο Paul van Helden έγραψε: On Wed, Feb 20, 2019 at 4:35 PM Dimitrios Chr. Ioannidis via fpc-devel > wrote:   Even if declaring variables as close as possible to where the variable will be used ( debugging wise not read

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Martin Frb
On 20/02/2019 15:46, Paul van Helden wrote: On Wed, Feb 20, 2019 at 4:35 PM Dimitrios Chr. Ioannidis via fpc-devel > wrote:   Even if declaring variables as close as possible to where the variable will be used ( debugging wise not readability wise

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Martin Frb
On 20/02/2019 14:36, Paul van Helden wrote: So the argument against is: (1) split your long functions, because you should; and (2) Wirth didn't do it, so good it is not. Long functions *might* be an indication of bad design, but you know, sometimes I have a long function that doesn't make se

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Marco van de Voort
(sorry for the pm, Paul, should have gone to list) Op 2/20/2019 om 3:32 PM schreef Paul van Helden: On Wed, Feb 20, 2019 at 3:52 PM Sven Barth via fpc-devel > wrote: Pascal is a language where declaration and use of variables is separated. It mak

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Paul van Helden
On Wed, Feb 20, 2019 at 4:35 PM Dimitrios Chr. Ioannidis via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > Even if declaring variables as close as possible to where the variable > will be used ( debugging wise not readability wise ) leads to more correct > code, the problem is to avoid th

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Dimitrios Chr. Ioannidis via fpc-devel
Hi, Στις 20/2/2019 3:36 μ.μ., ο Paul van Helden έγραψε: > > 1. it makes it easier to see the whole picture just looking at the loop > > body, no need to scroll up; (The loop body might be just 10 lines of code, > > whereas the whole containing function sometimes has 1000s)

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Paul van Helden
On Wed, Feb 20, 2019 at 3:52 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > > Pascal is a language where declaration and use of variables is separated. > It makes it easy to see what variables are declared and what type they are. > Inline variables mess this up as a variabl

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Marcos Douglas B. Santos
On Wed, Feb 20, 2019 at 10:25 AM Henry Vermaak wrote: > > On Wed, Feb 20, 2019 at 09:47:20AM -0300, Marcos Douglas B. Santos > wrote: > > On Wed, Feb 20, 2019 at 8:32 AM Henry Vermaak > > wrote: > > > I'm mostly more interested in limiting the scope to prevent > > > accidental use, like you. It

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Dimitrios Chr. Ioannidis via fpc-devel
Hi, Στις 20/2/2019 3:25 μ.μ., ο Henry Vermaak έγραψε: On Wed, Feb 20, 2019 at 09:47:20AM -0300, Marcos Douglas B. Santos wrote: On Wed, Feb 20, 2019 at 8:32 AM Henry Vermaak wrote: I'm mostly more interested in limiting the scope to prevent accidental use, like you. It can also offer more fi

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Sven Barth via fpc-devel
Am Mi., 20. Feb. 2019, 12:07 hat Nikolai Zhubr geschrieben: > So I'm just wondering, what is wrong with such approach that it is > considered so harmfull for Pascal? (Not talking here about possible > excessive complexity of actual implementation in compiler, and not > talking about the exact syn

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Paul van Helden
> > > > > 1. it makes it easier to see the whole picture just looking at the loop > > > body, no need to scroll up; (The loop body might be just 10 lines of > code, > > > whereas the whole containing function sometimes has 1000s) > > > > > > 2. it isoltates the scope of such variable(s), therefore

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Henry Vermaak
On Wed, Feb 20, 2019 at 09:47:20AM -0300, Marcos Douglas B. Santos wrote: > On Wed, Feb 20, 2019 at 8:32 AM Henry Vermaak > wrote: > > I'm mostly more interested in limiting the scope to prevent > > accidental use, like you. It can also offer more fine grained > > control of where managed variabl

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Marcos Douglas B. Santos
On Wed, Feb 20, 2019 at 8:32 AM Henry Vermaak wrote: > > On Wed, Feb 20, 2019 at 02:26:20PM +0300, Nikolai Zhubr wrote: > > 20.02.2019 13:21, Sven Barth via fpc-devel: > > [...] > > >And we don't agree here. For us inline variables is one of the most > > >horrid if not *the* most horrid thing Emba

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Marcos Douglas B. Santos
On Wed, Feb 20, 2019 at 8:07 AM Nikolai Zhubr wrote: > > Hi all, > > 20.02.2019 13:21, Sven Barth via fpc-devel: > [...] > > And we don't agree here. For us inline variables is one of the most > > horrid if not *the* most horrid thing Embarcadero could have done to > > Object Pascal. > > Could you

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Marcos Douglas B. Santos
On Wed, Feb 20, 2019 at 7:21 AM Sven Barth via fpc-devel wrote: > > And we don't agree here. For us inline variables is one of the most horrid if > not *the* most horrid thing Embarcadero could have done to Object Pascal. +1 Even this isn't break compatibility with past code, it turns the langua

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Henry Vermaak
On Wed, Feb 20, 2019 at 02:26:20PM +0300, Nikolai Zhubr wrote: > 20.02.2019 13:21, Sven Barth via fpc-devel: > [...] > >And we don't agree here. For us inline variables is one of the most > >horrid if not *the* most horrid thing Embarcadero could have done to > >Object Pascal. > > Could you elabor

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Nikolai Zhubr
Hi all, 20.02.2019 13:21, Sven Barth via fpc-devel: [...] And we don't agree here. For us inline variables is one of the most horrid if not *the* most horrid thing Embarcadero could have done to Object Pascal. Could you elaborate a bit about it? While I'm not really sure what they have done ex

Re: [fpc-devel] "Blank slate" next version of FPC

2019-02-20 Thread Sven Barth via fpc-devel
Am Mi., 20. Feb. 2019, 08:36 hat Paul van Helden geschrieben: > and FPC's goal to remain Delphi-compatible. >>> >>> >>> So are inline variables coming soon? >>> http://blog.marcocantu.com/blog/2018-october-inline-variables-delphi.html >>> >> >> We have already decided internally that this feature

Re: [fpc-devel] re "Blank slate" next version of FPC

2019-02-20 Thread Marco van de Voort
Op 2/17/2019 om 5:58 PM schreef Fred van Stappen: Am 17.02.19 um 04:48 schrieb Marco van de Voort > Martin was a loner kind of guy, he did the most of the MSEGUI etc > projects alone too. Did you know him personally? I meant the loner label as relating to programming only. It is not necessa