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

Michael Van Canneyt michael at freepascal.org
Tue Aug 22 15:30:15 CEST 2017



On Tue, 22 Aug 2017, Kazantsev Alexey via fpc-devel wrote:

> On Tue, 22 Aug 2017 13:15:24 +0200 (CEST)
> Michael Van Canneyt <michael at freepascal.org> 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.
>
>
> SomeProc(Builder
>           .Build('1')
>           .Build('2')
>           .Build('3').Value);

As far as I can see, that's not really different from the example Sven gave me ?

With builder do
   begin
   Build('1');
   Build('2');
   Build('3');
   SomeProc(Value);
   end;

Michael.



More information about the fpc-devel mailing list