[phobos] std.process deprecations

Andrei Alexandrescu via phobos phobos at puremagic.com
Thu Aug 7 12:29:53 PDT 2014


I'd say we're good as we are. I agree repeating the argument is kind of 
meh but these are venerable functions instantly recognizable by many. 
Deprecating them in favor of new ones with minor cosmetic deltas gets 
close to wankery real quick. -- Andrei

On 8/7/14, 12:04 PM, Lars Tandle Kyllingstad via phobos wrote:
> On 07/08/14 20:20, Andrei Alexandrescu wrote:
>> On 8/7/14, 11:03 AM, Lars Tandle Kyllingstad via phobos wrote:
>>>
>>> [Extremely convincing arguments omitted]
>>
>> Well I guess that's acceptable. Thanks. -- Andrei
>
> Awesome! :)
>
> Next order of business:  Improving the exec* API.  The following is an
> excerpt from the documentation:
>
>      int execv(in string pathname, in string[] argv);
>      [...]
>      Typically, the first element of argv is the command being executed,
>      i.e. argv[0] == pathname.
>      [...]
>      Returns -1 on failure with no indication of the underlying error.
>
> I find this extremely unsatisfying. First of all, there is really no
> need to repeat pathname in argv, and secondly, the functions could
> easily throw an exception with an informational error message based on
> errno.
>
> I suggest deprecating these functions on POSIX too, and creating new,
> POSIX-only functions with equivalent functionality but an improved API.
>
> Thoughts?  Is it worth it?
>
> Lars
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list