<p dir="ltr">It breaks ufcs chaining so you can't continue the chain, see above.</p>
<div class="gmail_quote">On Apr 2, 2013 8:45 AM, "Nick Treleaven" <<a href="mailto:ntrel-public@yahoo.co.uk">ntrel-public@yahoo.co.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/04/2013 14:33, Nick Treleaven wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 02/04/2013 01:10, bearophile wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sometimes you want to print something coming out of a UFCS chain with a<br>
formatting string. In this case you can't append the writef/writefln at<br>
the end of the chain. The problem is easy to solve with two simple<br>
functions like this. Are they worth having in std.stdio?<br>
</blockquote>
<br>
I think usually the format string is known statically, so we could have<br>
a template overload of writef[ln] with a compile-time format parameter.<br>
<br>
We can then use that overload for UFCS:<br>
<br>
5.writefln!"hi %s!";<br>
</blockquote>
<br>
Of course, the main point of doing that is to compile-time validate the format string. But UFCS is a nice consequence.<br>
</blockquote></div>