[Issue 12615] Warn against, and then deprecate old alias syntax
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Nov 4 23:23:24 PST 2014
https://issues.dlang.org/show_bug.cgi?id=12615
--- Comment #18 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
I think that either using the old syntax should be considered to be just fine,
and we should stop trying to push the new syntax on people any more than we
push while(1) over for(;;), or we should just deprecate the old syntax and move
on.
There have been recent pushes to remove uses of the old syntax from druntime
and Phobos, and almost everyone seems to be in favor of using the new syntax
exclusively. Personally, I prefer the old syntax, but I'm clearly in the
minority, and we're just going to end up with arguments over whether anyone
should use the older syntax if we keep it around. If such a large percentage of
the D developers are in favor of the newer syntax and against anyone using the
older syntax (as appears to be the case), we might as well just get rid of the
old one, since retaining it just causes confusion and debate without adding
functionality. The only real cost is the annoyance of having to change code at
some point after the deprecation is in place.
And dfix is now able to replace all uses of the old syntax with the new syntax
for you, so updating existing code would be trivial. And deprecation doesn't
break code anyway. It just warns people that the code will be broken at some
point in the future (the messages can be annoying if there are a lot of them,
but the code continues to work exactly as it did before).
So arguably, we really should either just deprecate the old syntax and move on
or put a notice in the changelog that we're planning to do so and then actually
deprecate it in a release or two.
--
More information about the Digitalmars-d-bugs
mailing list