Vote for std.process
Tove
tove at fransson.se
Fri Apr 12 12:26:12 PDT 2013
On Friday, 12 April 2013 at 15:43:27 UTC, Steven Schveighoffer
wrote:
> On Fri, 12 Apr 2013 04:14:15 -0400, Manu <turkeyman at gmail.com>
>> I'd use string[].
>
> You mean with format "a=b"? I suppose that's possible, though
> horrible to work with before passing in. Plus what happens if
> you have ["a=b", "a=c"] ? AA's prevent these kinds of
> mistakes/contradictions.
>
I prefer Manu's idea with the API accepting string[], it's closer
to the native format.
Then you could simply provide a convenience conversion from a
map...
ex env!["foo" : "bar"] which would convert it to ["foo=bar"].
This also has the added benefit of being self
documenting(considering the lack of named parameters).
But most importantly So the user has a free choice of
constructing the env parameter manually in the most efficient way
or using the lazy convenience function.
More information about the Digitalmars-d
mailing list