Re: [fpc-devel] Move operator

2019-07-14 Thread Ryan Joseph
> On Jul 14, 2019, at 12:40 PM, Michael Van Canneyt > wrote: > > Maybe there is no need for a move operator ? I have not seen any argument > that makes the need for this operator crystal clear. > > When I read your proposal, my first thought was: "solution looking for a > problem." Look at

Re: [fpc-devel] Move operator

2019-07-14 Thread Michael Van Canneyt
On Sun, 14 Jul 2019, Ryan Joseph wrote: On Jul 14, 2019, at 11:58 AM, Michael Van Canneyt wrote: You are assuming here that there is a problem. Has it occurred to you that maybe there is no problem and that a solution is simply not needed? How is this not a problem? Sorry I don’t

Re: [fpc-devel] Move operator

2019-07-14 Thread Ryan Joseph
> On Jul 14, 2019, at 11:58 AM, Michael Van Canneyt > wrote: > > You are assuming here that there is a problem. Has it occurred to you that > maybe there is no problem and that a solution is simply not needed? How is this not a problem? Sorry I don’t follow you. Regards, Ryan Joseph

Re: [fpc-devel] Move operator

2019-07-14 Thread Michael Van Canneyt
On Sun, 14 Jul 2019, Ryan Joseph wrote: On Jul 14, 2019, at 8:55 AM, Jonas Maebe wrote: The question then still remains: why would a user want to call a copy operator when the data is just moved from a temp to another place? Having an explicit copy operator when there is no use case for

Re: [fpc-devel] Move operator

2019-07-14 Thread Ryan Joseph
> On Jul 14, 2019, at 8:55 AM, Jonas Maebe wrote: > > The question then still remains: why would a user want to call a copy > operator when the data is just moved from a temp to another place? > Having an explicit copy operator when there is no use case for it only > requires programmers to

Re: [fpc-devel] Move operator

2019-07-14 Thread Jonas Maebe
On 13/07/2019 15:13, Ryan Joseph wrote: > > >> On Jul 13, 2019, at 8:21 AM, Jonas Maebe wrote: >> >> In which scenarios do you need such a custom "move" operator, rather >> than simply allowing the compiler to just copy the data from one place >> to the other without calling a destructor on the

Re: [fpc-devel] Move operator

2019-07-13 Thread Ryan Joseph
> On Jul 13, 2019, at 8:21 AM, Jonas Maebe wrote: > > In which scenarios do you need such a custom "move" operator, rather > than simply allowing the compiler to just copy the data from one place > to the other without calling a destructor on the old instance? Not sure off the top of my head

Re: [fpc-devel] Move operator

2019-07-13 Thread Jonas Maebe
On 10/07/2019 22:36, Ryan Joseph wrote: > So I've started using the record management operators in earnest and see a > real need for another “Move” operator in order to prevent the constant > unnecessary copies. If you look at the example in the bug report you’ll see > where adding a Move

[fpc-devel] Move operator

2019-07-10 Thread Ryan Joseph
So I've started using the record management operators in earnest and see a real need for another “Move” operator in order to prevent the constant unnecessary copies. If you look at the example in the bug report you’ll see where adding a Move operator will save you 2 copies and that it works as