[phobos] std.process deprecations

Lars Tandle Kyllingstad via phobos phobos at puremagic.com
Thu Aug 7 11:47:25 PDT 2014


On 07/08/14 20:20, Jonathan M Davis via phobos wrote:

> If they don't do the same thing on both platforms, then they shouldn't be the
> same function. That totally breaks portability. Phobos functions should be
> portable unless they're versioned to a specific OS. We may be stuck with
> slightly different behavior on different OSes in some cases, but we should be
> _very_ leery of it and try to avoid it as much as possible. Doing otherwise
> is just begging for bugs.

My point exactly.

> It sounds like we should provide the functionality for both systems, but if
> anyone is currently using these functions and expecting them to work the same
> on both systems, they could be in for a big shock. So, these functions should
> probably be replaced with system-specific versions for both POSIX and Windows
> - be that in different modules or in the same module with different names.

I don't think we should provide that functionality on Windows at all, 
because it would just be a thin wrapper around the following:

     spawnProcess(...);
     _exit(0);

Keeping it around will just confuse people into thinking that it does 
something more or different.

Lars


More information about the phobos mailing list