The new std.process is ready for review

H. S. Teoh hsteoh at quickfur.ath.cx
Sun Feb 24 11:43:24 PST 2013


On Sun, Feb 24, 2013 at 10:05:01AM +0200, Andrei Alexandrescu wrote:
> On 2/24/13 6:26 AM, Andrej Mitrovic wrote:
> >Phobos modules which already use std.process would have to be changed
> >to directly import std.process1 or std.process2.
> 
> This is problematic as has been discussed. I think we could address
> immediate needs by attaching an attribute to import, e.g.:
> 
> @"v2.070+" import std.process;

Better yet, @">v.2070". So that later on it can be extended to
@">v2.070 <v2.084", etc.. But I don't know if it's a good idea to push
it that far...


> or similar. By default code would import the old library.
[...]

Alternatively, use a version identifier:

	version = newStdProcess;
	import std.process;	// get new version
	-----
	//version = newStdProcess;
	import std.process;	// get old version

Then once the old version has gone through the deprecation cycle and is
kicked out, the new code can just ignore version=newStdProcess and
always import the new version, and existing user code needs no changes.


T

-- 
Why ask rhetorical questions? -- JC


More information about the Digitalmars-d mailing list