The new std.process is ready for review

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Feb 23 20:26:20 PST 2013


On 2/24/13, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
> No, version is mutually exclusive.  You can't have all of phobos depending
> on std.process version 2, but you want to use std.process version 1.  Both
> would have to be compiled in.  I don't think you can do that with version
> statements.

I meant something like this:

std\process1.d  -- old process
std\process2.d  -- new process

std\process.d:
----------
version(OldProcess)
  public import std.process1;
else
  public import std.process2;
----------

Phobos modules which already use std.process would have to be changed
to directly import std.process1 or std.process2.

Old user code which wants to still compile using the old process would
have to add the -version=OldProcess switch /or/ change import
statements to 'import std.process1'.

If the old code wants to use both it can simply import 'std.process1'
or 'std.process2' as needed.

New code would simply import std.process and use the new code without
having to fiddle with anything.


More information about the Digitalmars-d mailing list