<div class="gmail_quote">On Tue, May 15, 2012 at 11:46 AM, deadalnix <span dir="ltr"><<a href="mailto:deadalnix@gmail.com" target="_blank">deadalnix@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Le 15/05/2012 18:19, Gor Gyolchanyan a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Tue, May 15, 2012 at 7:51 PM, Christophe<br>
<<a href="mailto:travert@phare.normalesup.org" target="_blank">travert@phare.normalesup.org</a> <mailto:<a href="mailto:travert@phare.normalesup.org" target="_blank">travert@phare.<u></u>normalesup.org</a>>> wrote:<br>


<br>
    using printf will lead to a bug each time the programmer forget the<br>
    trailing<br>
    \0.<br>
<br>
<br></div><div class="im">
First of all, printf shouldn't be used! There's writef and it's superior<br>
to printf in any way!<br>
Second of all, if the zero-termination of literals are to be removed,<br>
the literals will no longer be accepted as a pointer to a character.<br>
The appropriate type mismatch error will force the user to use toUTF8z<br>
to get ht e zero-terminated utf-8 version of the original string.<br>
In case it's a literal, one could use the compile-time version of<br>
toUTF8z to avoid run-time overhead.<br>
This all doesn't sound like a bad idea to me. I don't see any security<br>
or performance flaws in this scheme.<br></div>
--<br>
Bye,<br>
Gor Gyolchanyan.<br>
</blockquote>
<br>
May god ear you !<br></blockquote><div><br></div><div>Unfortunately, using writef/writefln would make DRuntime depend on Phobos, which is unacceptable. </div></div><br>