[phobos] std.process deprecations

Jonathan M Davis via phobos phobos at puremagic.com
Wed Aug 6 16:12:23 PDT 2014


> Sent: Wednesday, August 06, 2014 at 1:53 PM
> From: "Lars Tandle Kyllingstad via phobos" <phobos at puremagic.com>
> To: "Phobos mailing list" <phobos at puremagic.com>
> Subject: [phobos] std.process deprecations
>
> Hi,
>
> Functions from the old std.process have been marked (in documentation)
> as "scheduled for deprecation" since April 2013.  I'm not completely
> clear on the deprecation process we're currently using.  Is it OK to
> finally add a "deprecated" attribute to them now?  I am currently doing
> some maintenance work on std.process, and this seems like a good time to
> do it.
>
> The functions in question are: system(), getpid(), shell(), getenv(),
> setenv() and unsetenv().  All of these have equivalents among the newer
> std.process functions, as specified in the deprecation notices.
>
> The exec*() family of functions is also marked as such, but it was
> agreed(?) in a NG discussion to only deprecate them on Windows, and to
> move them to a separate module on POSIX:
>
> http://forum.dlang.org/thread/l4nav4$q9r$1@digitalmars.com?page=2#post-l4ph2m:2410t:242:40digitalmars.com

We really aren't "scheduling" anything for deprecation anymore, which is
probably why I missed those functions and have never actually deprecated them
when I last was moving the Phobos deprecations along. Now that deprecated just
prints out a message rather than blocking compilation, there's no reason not
to just immediately deprecate anything that we want to deprecate. So, if we're
going to deprecate them, we should just deprecate them.

If we want to keep them on POSIX but not Windows, then we need to either move
them to a new module where they're POSIX-only and deprecate the ones in
std.process, or we need to version them out in std.process so that they're
deprecated on Windows and not on POSIX.

- Jonathan M Davis


More information about the phobos mailing list