The new std.process is ready for review

Steven Schveighoffer schveiguy at yahoo.com
Tue Feb 26 10:22:33 PST 2013


On Tue, 26 Feb 2013 12:10:00 -0500, Vladimir Panteleev  
<vladimir at thecybershadow.net> wrote:

> On Tuesday, 26 February 2013 at 16:45:08 UTC, Steven Schveighoffer wrote:
>> On Tue, 26 Feb 2013 11:09:48 -0500, Lars T. Kyllingstad  
>> <public at kyllingen.net> wrote:
>>> You'd use it like this:
>>>
>>> spawnProcess(["prog"]);
>>
>> That allocates.  I don't like that requirement.
>
> I know this is debatable and that we've discussed this before, but I  
> feel I should still mention that the cost of one more small allocation  
> will be absolutely negligible compared to the cost of creating a new  
> process, even taking into account long-term effects of heap  
> fragmentation and such. I don't think that API design should suffer for  
> such a small performance cost.

Even the API is ugly.  It takes no significant code or really  
understanding to make a single-arg spawnProcess that does the same thing.

-Steve


More information about the Digitalmars-d mailing list