Re: [fpc-devel] Looking for clarification on what I think are obviously missing "const" prefixes for parameters in the methods of TRect (the typshrdh.inc one)

2019-01-27 Thread Mattias Gaertner via fpc-devel
On Sat, 26 Jan 2019 20:52:44 -0500 John Doe wrote: >[...] > Regardless, units like graphmath.pp > I added some const and inline. Mattias ___ fpc-devel maillist - fpc-devel@lists.fre

Re: [fpc-devel] Looking for clarification on what I think are obviously missing "const" prefixes for parameters in the methods of TRect (the typshrdh.inc one)

2019-01-27 Thread Sven Barth via fpc-devel
Am So., 27. Jan. 2019, 02:53 hat John Doe geschrieben: > However, I'm also quite simply unaware of any specific realistic scenario > where I would *ever* specify a un-prefixed record in a method (in my own > projects for example I actually haven't used anything but "var" and > "constref" for year

Re: [fpc-devel] Looking for clarification on what I think are obviously missing "const" prefixes for parameters in the methods of TRect (the typshrdh.inc one)

2019-01-27 Thread Marco van de Voort
Op 2019-01-27 om 01:55 schreef Ben Grasset: On Sat, Jan 26, 2019 at 7:06 PM Marco van de Voort mailto:f...@pascalprogramming.org>> wrote: Anyway, a patch would be welcome. Ok, I'll work one up that merges properly against the current trunk versions. Thanks for the quick response also, I

Re: [fpc-devel] Looking for clarification on what I think are obviously missing "const" prefixes for parameters in the methods of TRect (the typshrdh.inc one)

2019-01-27 Thread Walter Prins
On Sun, 27 Jan 2019 at 01:53, John Doe wrote: > On Sat, Jan 26, 2019 at 7:44 PM Sven Barth via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > >> Changing this behavior would not only be a backwards incompatibility, but >> would also violate the ABI which describes how records shall be pas

Re: [fpc-devel] Looking for clarification on what I think are obviously missing "const" prefixes for parameters in the methods of TRect (the typshrdh.inc one)

2019-01-27 Thread Sven Barth via fpc-devel
Am So., 27. Jan. 2019, 14:12 hat Walter Prins geschrieben: > On Sun, 27 Jan 2019 at 01:53, John Doe > wrote: > >> On Sat, Jan 26, 2019 at 7:44 PM Sven Barth via fpc-devel < >> fpc-devel@lists.freepascal.org> wrote: >> >>> Changing this behavior would not only be a backwards incompatibility, >>>

Re: [fpc-devel] Looking for clarification on what I think are obviously missing "const" prefixes for parameters in the methods of TRect (the typshrdh.inc one)

2019-01-27 Thread Jonas Maebe
On 27/01/19 14:11, Walter Prins wrote: Would it perhaps be possible to treat this as a type of optimization however?  Which is to say, if the called routine makes no changes to the passed record, then it should not matter whether compiler implicitly const passes the parameter or copies it? It

Re: [fpc-devel] Looking for clarification on what I think are obviously missing "const" prefixes for parameters in the methods of TRect (the typshrdh.inc one)

2019-01-27 Thread Mattias Gaertner via fpc-devel
On Sun, 27 Jan 2019 13:11:53 + Walter Prins wrote: >[...] > Just thinking out loud (probably a bad idea) but: > > Would it perhaps be possible to treat this as a type of optimization > however? Which is to say, if the called routine makes no changes to > the passed record, then it should no

Re: [fpc-devel] Looking for clarification on what I think are obviously missing "const" prefixes for parameters in the methods of TRect (the typshrdh.inc one)

2019-01-27 Thread Ben Grasset
On Sun, Jan 27, 2019 at 8:00 AM Marco van de Voort < f...@pascalprogramming.org> wrote: > I wonder though that maybe makes passing properties etc difficult? > As far I know "const" has no tangible effect on how properties can be passed. Here's a little example to demonstrate: program Test; {$mo