<div dir="ltr">On 21 October 2013 21:24, Denis Shelomovskij <span dir="ltr"><<a href="mailto:verylonglogin.reg@gmail.com" target="_blank">verylonglogin.reg@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">21.10.2013 14:30, Manu пишет:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
System interface functions that pass zero-terminated strings through to<br>
the OS are the primary offender, needless garbage, those should be on<br>
the stack.<br>
<br>
I like to use alloca too where it's appropriate. I'd definitely like if<br>
D had a variable-sized static array syntax for pretty-ing alloca.<br>
I thought about something similar using alloca via a mixin template, but<br>
that feels really hackey!<br>
</blockquote>
<br></div>
No hacks needed. See `unstd.c.string` module from previous post:<br>
<a href="http://forum.dlang.org/thread/lqdktyndevxfcewgthcj@forum.dlang.org?page=2#post-l42evp:241ok7:241:40digitalmars.com" target="_blank">http://forum.dlang.org/thread/<u></u>lqdktyndevxfcewgthcj@forum.<u></u>dlang.org?page=2#post-l42evp:<u></u>241ok7:241:40digitalmars.com</a></blockquote>
<div><br></div><div>Super awesome! Phobos devs should be encouraged to use these in non-recursive functions (particularly OS pass-through's).</div></div></div></div>