On Fri, 12 Apr 2013 11:24:37 -0400, Andrej Mitrovic <[email protected]> wrote:

On 4/12/13, Manu <[email protected]> wrote:
string[string] is used in the main API to receive environment variables;
perhaps kinda convenient, but it's impossible to supply environment
variables with loads of allocations.

I think the functions which take the environment as an associative
array can be changed without breaking any user code. E.g.:

Pid spawnProcess(Env)(in char[][] args,
                 File stdin = std.stdio.stdin,
                 File stdout = std.stdio.stdout,
                 File stderr = std.stdio.stderr,

                 /* was const string[string] env = null */
                 const Env env = Env.init,

                 Config config = Config.none)
    if (isSomeAssociativeArray!Env)  // introduce constraint
{
}

Then the user can provide their custom stack-based type which implements opIn_r.

It's a good idea. I believe it can be done later without breaking any code.

-Steve

Reply via email to