eliminate junk from std.string?
Jonathan M Davis
jmdavisProg at gmx.com
Tue Jan 11 18:10:28 PST 2011
On Tuesday, January 11, 2011 17:17:43 Daniel Gibson wrote:
> Am 12.01.2011 01:55, schrieb Jonathan M Davis:
> > On Tuesday, January 11, 2011 16:23:13 Daniel Gibson wrote:
> >> Deprecating them is certainly a good idea, but I'd suggest to keep the
> >> deprecated aliases around for longer (until D3), so anybody porting a
> >> Phobos1-based application to D2/Phobos2 can use them, even if he doesn't
> >> do this within the next few releases.
> >
> > Well, leaving an alias until D3 would equate to a permanent alias in D2,
> > which is exactly what Walter and Andrei don't want (and I don't either).
> > There's already plenty in Phobos 2 that's different from Phobos 1. So,
> > while I don't think that we should rename stuff just to rename stuff, I
> > also don't think that we should keep aliases around just to make porting
> > D1 code easier - especially when most D1 code is probably using Tango
> > anyway. We don't really have a policy in place for how long deprecation
> > should last prior to outright removal, but until D3 is definitely too
> > long. I would have thought that the question would be more along the
> > lines of whether it should be a couple of releases or more like 6 months
> > to a year before removing deprecated functions and modules at this
> > point, not whether something will remain deprecated until D3.
> >
> > - Jonathan M Davis
>
> Somewhere in this thread:
>
> Am 11.01.2011 21:43, schrieb Walter Bright:
> > Nick Sabalausky wrote:
> >> I agree with this reasoning for having them. However, I don't think it
> >> means we shouldn't D-ify or Phobos-ify them, at least as far as
> >> capitalization conventions.
> >
> > I also object to rather pointlessly annoying people wanting to move
> > their code from D1 to D2 by renaming everything. Endlessly renaming
> > things searching for the perfect name gives the illusion of progress,
> > whereas time would be better spent on improving the documentation,
> > unittests, performance, etc.
>
> So his objection was specifically that renaming those functions could
> annoy people migrating D1 code (and certainly he meant Phobos1 users,
> because Tango-people either port (parts of) Tango or will have to
> rewrite that anyway).
> So, to accomplish that goal (not annoying those people), these aliases
> should be kept for longer.
>
> (An alternative may be to one/some phobos1-compat modules that contain
> such aliases and maybe even wrappers with old signatures for new
> functions, that could be imported to ease porting of old applications.
> That would have the benefit of not cluttering the regular Phobos2
> modules with that legacy stuff.)
Well, I didn't say that Walter wasn't concerned about it. I just don't see the
point. Phobos has changed enough from D1 to D2 that even D1 Phobos users (of
which I get the impression there are relatively few) that there's probably
already plenty of stuff which is going to break for anyone porting over. I do
think that keeping a deprecated alias around longer for a function which has
been around longer makes sense, and the Phobos 1 functions have been around
longer than anything else. So, deprecating a function that was added 2 releases
ago probably shouldn't require a deprecated alias for as long as deprecating a
function that was in Phobos 1 would, but there's still a limit to how long it
makes sense.
And given that your average D1 user uses Tango rather than Phobos, it makes that
much less sense to keep aliases to Phobos 1 functions around for a long time.
So, no, we shoudln't get rid of the deprecated alias for a Phobos 1 function
after only a release or two, but I don't think that it makes sense to keep it
around for a year or two either.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list