The new std.process is ready for review

Steven Schveighoffer schveiguy at yahoo.com
Sat Feb 23 19:19:19 PST 2013


On Sat, 23 Feb 2013 21:46:32 -0500, Andrej Mitrovic  
<andrej.mitrovich at gmail.com> wrote:

> On 2/24/13, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
>> I'm not sure this would happen.  In order for a module to be  
>> "renumbered",
>>
>> it needs to be a complete rewrite from scratch, with no common ancestry.
>> If we have anything that goes to 3, something is wrong.  We should not  
>> be
>> approving new designs if we plan to get rid of them later.
>
> Ah but how can you guarantee we won't ever need a 3rd rewrite? It's
> always possible we might need one in the future.

I can't *guarantee* it, but I think it's counter-productive to keep  
ripping apart standard library designs and recreating them.  I think after  
this many years, we should have come up with a design that works well.   
That is the point of having it reviewed by all you smart people out  
there!  If there is wide consensus that std.process2 does not have a good  
API, or even a large division of opinions, we may need to rethink the  
API.  I hope this is not the case!

Note, a rewrite of the implementation does not require a rename.  It's the  
API which is critical to get right the first (or second) time.

> It's also a problem if we have to start remembering version numbers
> for each module we import. E.g.:
>
> import std.process2;
> import std.xml; // oops, did I mean xml2 maybe?

This will print a warning to import std.xml2 instead.

> It's going to be annoying using Phobos like that. I was going to
> suggest using version flags, but even that could be annoying, although
> that feature was practically invented for this kind of problem.

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.

My recommendation would be to have an 'old' directory, and if people want  
to use the old process, use old.process.  We have a nice module system, I  
think we should use it!

Oh shit, I said I didn't want to get back into this debate again... a lot  
of good that did...

Forget everything I said...

-Steve


More information about the Digitalmars-d mailing list