On Tuesday, January 11, 2011 16:23:13 Daniel Gibson wrote: > Am 12.01.2011 01:17, schrieb Jonathan M Davis: > > On Tuesday, January 11, 2011 16:07:11 Daniel Gibson wrote: > >> Am 12.01.2011 00:59, schrieb Jonathan M Davis: > >>> On Tuesday, January 11, 2011 15:29:54 Ary Borenszweig wrote: > >>>> So what's a good use for aliases? > >>> > >>> 2. Deprecating a function name. For instance, let's say that we rename > >>> splitl to splitL or SplitLeft in std.string. Having a deprecated alias > >>> to splitl would avoid immediately breaking code. > >> > >> Isn't this exactly what Ary had in mind? :-) > > > > No, or at least that's not the impression that I got. I understood that > > he meant to have to aliases around permanently. It's just confusing and > > adds clutter to do things like have both splitl and splitLeft (or splitL > > or whotever splitl got renamed to) around in the long run. _That_ is > > what Andrei and Walter is objecting to. > > > > Renaming a function and having a deprecated alias to the old name for a > > few releases eases the transition would definitely be good practice. > > aliasing a function just to have another name for the same thing > > wouldn't be good practice. There has to be a real benefit to having the > > second name. Providing a smooth deprecation route would be a case where > > there's a real benefit. > > > > - Jonathan M Davis > > Ok, you're right, that is a slight difference. > > 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
