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++ has no with-statement and second I definitely prefer my output to
be on one line. :)

   With StdIO::stdOutPrinter() do begin out("Helllo World 
");out(42);out("");hex();out(42);line(); end;

;)

Also in other cases fluent interfaces are rather nice to have.
Though they also don't force you to be used in that way :) (at least if
they really only return Self/This).

I guess it is a matter of style.

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to