Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Stefan Glienke
Often a fluent API has some grammar described via different interfaces that are implemented by either one (in this case you always return Self) or different classes. It is not just to chain methods together that you could also write like you did. > On 22 August 2017 at 13:15 Michael Van Canneyt

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Michael Van Canneyt
On Tue, 22 Aug 2017, Kazantsev Alexey via fpc-devel wrote: On Tue, 22 Aug 2017 13:15:24 +0200 (CEST) Michael Van Canneyt wrote: Call me old-fashioned, but I much prefer With StdIO::stdOutPrinter() do begin out("Helllo World "); out(42); out(""); hex(); out(

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Kazantsev Alexey via fpc-devel
On Tue, 22 Aug 2017 13:15:24 +0200 (CEST) Michael Van Canneyt wrote: > Call me old-fashioned, but I much prefer > >With StdIO::stdOutPrinter() do > begin > out("Helllo World "); > out(42); > out(""); > hex(); > out(42); > line(); > end; > > I see no p

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Michael Van Canneyt
On Tue, 22 Aug 2017, Sven Barth via fpc-devel wrote: Call me old-fashioned, but I much prefer With StdIO::stdOutPrinter() do begin out("Helllo World "); out(42); out(""); hex(); out(42); line(); end; I see no point or gain in the "fluent" code. First C++

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Sven Barth via fpc-devel
Am 22.08.2017 13:15 schrieb "Michael Van Canneyt" : > > > > On Tue, 22 Aug 2017, Thaddy de Koning wrote: > >>> On 21.08.2017 13:22, Michael Van Canneyt wrote: On Mon, 21 Aug 2017, Benito van der Zander wrote: > Hi, > >> This pattern is not inherently efficient.

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Michael Van Canneyt
On Tue, 22 Aug 2017, Thaddy de Koning wrote: On 21.08.2017 13:22, Michael Van Canneyt wrote: On Mon, 21 Aug 2017, Benito van der Zander wrote: Hi, This pattern is not inherently efficient. Why should it be ? It is not efficient, because of the pointless instruction! I am not speaki

Re: [fpc-devel] Optimizing unused return values of inline functions

2017-08-22 Thread Thaddy de Koning
> On 21.08.2017 13:22, Michael Van Canneyt wrote: >> >> >> On Mon, 21 Aug 2017, Benito van der Zander wrote: >> >>> Hi, >>> This pattern is not inherently efficient. Why should it be ? >>> >>> >>> It is not efficient, because of the pointless instruction! >> >> I am not speaking of the current