The new std.process is ready for review

H. S. Teoh hsteoh at quickfur.ath.cx
Sat Feb 23 18:30:57 PST 2013


On Sat, Feb 23, 2013 at 07:59:45PM -0500, Steven Schveighoffer wrote:
> On Sat, 23 Feb 2013 19:44:29 -0500, H. S. Teoh
> <hsteoh at quickfur.ath.cx> wrote:
[...]
> >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
> :)
[...]

Well, in this case, I'd push for a deprecation path for the badly
designed modules, so that the current std.process will eventually be
phased out and replaced with std.process2, and then we can rename
std.process2 to std.process (and leave a public import in std.process2
to maintain compatibility with current code).

I really do not like the name "std.process2". It is exactly the kind of
thing that will cause newbies to avoid it and go back to the old badly
designed std.process, and then come back to complain about it, then when
told to use std.process2, they will wonder "why the 2?". It's just ugly.

OTOH, if we're going to be reorganizing the Phobos module hierarchy,
then that may be a good time to get the new std.process into the right
name, and leave the old one somewhere else (maybe remain as
std.process if the new one goes somewhere else in the hierarchy).


T

-- 
VI = Visual Irritation


More information about the Digitalmars-d mailing list