Re: [fpc-pascal] Uniform initialization?

2018-11-13 Thread Vojtěch Čihák
: Delphi or FPC+Laz.   V. __ Od: "Martin Wynne" Komu: fpc-pascal@lists.freepascal.org Datum: 13.11.2018 11:11 Předmět: Re: [fpc-pascal] Uniform initialization? Delphi mode is very useful. It means old code from earlier versions

Re: [fpc-pascal] Uniform initialization?

2018-11-13 Thread Martin Wynne
Delphi mode is very useful. It means old code from earlier versions of Delphi (in my case Delphi5) can be open-sourced and made available via Lazarus to anyone interested, without their needing to get an expensive copy of the latest Delphi. Martin.

Re: [fpc-pascal] Uniform initialization?

2018-11-12 Thread Sven Barth via fpc-pascal
Am Di., 13. Nov. 2018, 07:04 hat Ryan Joseph geschrieben: > > > > On Nov 12, 2018, at 5:45 AM, Vojtěch Čihák > wrote: > > > > We've already decided internally that we are *not* going to support this. > > Why does FPC have Delphi mode anyways? It’s not actually compatible with > Delphi so what

Re: [fpc-pascal] Uniform initialization?

2018-11-12 Thread Ryan Joseph
> On Nov 12, 2018, at 5:45 AM, Vojtěch Čihák wrote: > > We've already decided internally that we are *not* going to support this. Why does FPC have Delphi mode anyways? It’s not actually compatible with Delphi so what is it used for? It seems like if you’re a Delphi user you would just use

Re: [fpc-pascal] Uniform initialization?

2018-11-12 Thread Ryan Joseph
> On Nov 12, 2018, at 1:55 PM, Sven Barth via fpc-pascal > wrote: > > That is a constructor that takes no arguments. How do you think that is > useful for a constructor that *does* take arguments? That is absolutely not > clear at all for the user. I just meant as a label so you know the

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Sven Barth via fpc-pascal
Am Mo., 12. Nov. 2018, 03:12 hat Ryan Joseph geschrieben: > > > > On Nov 12, 2018, at 12:25 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > I'm not convinced that this feature is really needed, because one can > simply create a constant and assign that, would

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Ryan Joseph
> On Nov 12, 2018, at 12:25 AM, Sven Barth via fpc-pascal > wrote: > > I'm not convinced that this feature is really needed, because one can simply > create a constant and assign that, would transport a clear name as well. This is for runtime though and necessarily for constants. It’s just

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Vojtěch Čihák
Very good.   V. __ Od: "Sven Barth via fpc-pascal" Komu: fpc-pascal@lists.freepascal.org Datum: 11.11.2018 18:22 Předmět: Re: [fpc-pascal] Uniform initialization? Am 11.11.2018 um 16:03 schrieb tobiasgie...@gmail.co

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Sven Barth via fpc-pascal
Am 11.11.2018 um 19:29 schrieb leledumbo via fpc-pascal: But *if* I had to decide I would pick #1, cause then there wouldn't be the chance to break existing code if a user decides to add a constructor to their record and some other code relies on there not being a constructor. Also due to the

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread leledumbo via fpc-pascal
> But *if* I had to decide I would pick #1, cause then there wouldn't be > the chance to break existing code if a user decides to add a constructor > to their record and some other code relies on there not being a > constructor. Also due to the syntax >

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Sven Barth via fpc-pascal
Am 11.11.2018 um 12:59 schrieb Ryan Joseph: Since I’ve got a little more free time I wanted to see if there was a simple solution to issue in Pascal that causes quite a bit of friction for me, i.e. constructor boiler plate. In c++ there is “uniform initialization” for structs which uses the

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Sven Barth via fpc-pascal
Am 11.11.2018 um 16:03 schrieb tobiasgie...@gmail.com: Hello, Delphi 10.3 is going to support inline variable declarations like this: begin var i : Integer := 22; WriteLn(i); end; I would assume it can also be used with records. For details, please see

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread Ryan Joseph
> On Nov 11, 2018, at 10:03 PM, tobiasgie...@gmail.com wrote: > > Hello, > > Delphi 10.3 is going to support inline variable declarations like this: > begin > var i : Integer := 22; > WriteLn(i); > end; > > I would assume it can also be used with records. For details, please see >

Re: [fpc-pascal] Uniform initialization?

2018-11-11 Thread tobiasgiesen
Hello, Delphi 10.3 is going to support inline variable declarations like this: begin var i : Integer := 22; WriteLn(i); end; I would assume it can also be used with records. For details, please see http://blog.marcocantu.com/blog/2018-october-inline-variables-delphi.html So maybe that's

[fpc-pascal] Uniform initialization?

2018-11-11 Thread Ryan Joseph
Since I’ve got a little more free time I wanted to see if there was a simple solution to issue in Pascal that causes quite a bit of friction for me, i.e. constructor boiler plate. In c++ there is “uniform initialization” for structs which uses the {} syntax. It’s basically identically to record