The new std.process is ready for review

Steven Schveighoffer schveiguy at yahoo.com
Sat Feb 23 16:59:45 PST 2013


On Sat, 23 Feb 2013 19:44:29 -0500, H. S. Teoh <hsteoh at quickfur.ath.cx>  
wrote:

> On Sat, Feb 23, 2013 at 04:25:33PM -0800, Jonathan M Davis wrote:
>> On Saturday, February 23, 2013 16:09:43 H. S. Teoh wrote:
>> > BTW, is "std.process2" just the temporary name, or are we seriously
>> > going to put in a "std.process2" into Phobos? I'm hoping the former,
>> > as the latter is unforgivably ugly.
>>
>> In previous discussions, it was agreed that future replacement modules
>> would simply have a number appended to them like that (e.g. std.xml2
>> or std.random2). I don't think that that decision is irreversible, but
>> unless someone can come up with a much better name, I'd expect it to
>> stick, and it has the advantage of making it very clear that it's
>> replacing the old one.
> [...]
>
> Ugh. I don't like this. I can see where it's coming from, and why it's
> necessary (to avoid breaking tons of code relying on the old API), but I
> really don't like it. It leads to the ugly situation of code that relies
> on both std.xyz7 and std.xyz19, just because parts of the code were
> written at different times, and it's too much work to clean up, which
> leaves people who read the code having to remember how version 19 of xyz
> differed from version 7.
>
> Unless we go through a deprecation process (no pun intended) where
> std.process2 is a temporary name until the old std.process is phased
> out, then std.process2 is renamed to std.process (perhaps leaving a
> wrapper public import in std.process2).
>
> I would really hate to see Phobos deteriorate into a situation of
> std.algorithm5, std.io7, std.regex4, std.process3, std.range5, where
> nobody can remember which version of which module is the most current
> without looking it up, just because we have to keep all the old names
> for backwards-compatibility.

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.

There are several modules in Phobos that are/were so bad they need to be  
rewritten from scratch.  std.process, std.xml are the two that come off  
the top of my head.  These were written back when Phobos was very young  
and foolish, and accepted any old design that a random programmer came up  
with.

std.range, std.algorithm, std.regex are all pretty safe, they aren't going  
to be rewritten unless something catastrophic is discovered in them that  
invalidates their entire design.  In fact, I think all of these were  
rewritten already.

So I think we just have to deal with it.  Just think, you will know some  
trivia when you are teaching D to some young developer someday :)

-Steve


More information about the Digitalmars-d mailing list