deprecate deprecated?

Jonathan M Davis jmdavisProg at gmx.com
Sat Nov 17 10:45:24 PST 2012


On Saturday, November 17, 2012 13:53:45 Kagamin wrote:
> On Sunday, 11 November 2012 at 21:14:10 UTC, Jonathan M Davis
> 
> wrote:
> >> Usage of deprecated symbol(s) should be a warning by default
> >> and the new
> >> option should be used to turn that into an error; not the
> >> other way around.
> > 
> > Agreed. Otherwise, you can't deprecate something without
> > immediately breaking
> > code, which means that if you're trying to never immediately
> > break people's
> > code when making a change (which is the position that Phobos is
> > in), then you
> > can't use deprecated.
> 
> fixing the broken code is as simple as
> make -DDFLAGS=-d

True, but you're still breaking code, and Walter is _very_ much against that. 
I think that if it were entirely up to him, no API would change ever. Also, if 
you start compiling with -d, then you have no idea what is and isn't 
deprecated, and then you're that much more screwed when a deprecated symbol is 
actually removed. It just would work a _lot_ better if deprecated warned by 
default. Then it's made clear that the code needs to be changed but the build 
isn't broken, and the maintainers have time to fix it before their code 
actually breaks and with the warnings still there reminding them rather than 
simply being made to go away with -d and then forgotten.

- Jonathan M Davis


More information about the Digitalmars-d mailing list