<div dir="ltr">On 13 April 2013 03:51, Steven Schveighoffer <span dir="ltr"><<a href="mailto:schveiguy@yahoo.com" target="_blank">schveiguy@yahoo.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Fri, 12 Apr 2013 13:37:50 -0400, Walter Bright <<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>> wrote:<br>

<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On 4/12/2013 5:52 AM, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Just to be clear, I'm not arguing optimisation for performance here, I'm arguing<br>
intolerance for __unnecessary__ allocations as a policy, or at least a habit.<br>
There's a whole separate thread on the topic of fighting unnecessary garbage,<br>
and having the ability to use D with strict control over the GC and/or<br>
allocation in general.<br>
<br>
If std functions have no reason to allocate, why should they?<br>
</blockquote>
<br>
Absolutely right. All phobos functions should not allocate unless absolutely necessary.<br>
</blockquote>
<br></div></div>
Define "absolutely."  For example, there was an objection to accepting an AA as an "environment" map to std.process.spawnX functions because even though reading the AA would not require allocation, allocation would certainly be required to build the AA.  Is that acceptable?  Certainly we could invent a new non-allocating map type and accept that instead.<br>

<br>
I think we need clearer lines drawn here, if they are to be respected.<br></blockquote><div><br></div><div style>Great! I was raising the issue, with the intent to open it for discussion.</div><div style><br></div><div style>
I never said an AA was intrinsically bad, only that it was impossible to call the function with an environment without allocating, ie, there is no way to pass a literal, and it's just being parsed and piped straight through to a system call, seems redundant to me.</div>
</div></div></div>