[phobos] Why "Scheduled for deprecation?"

Jonathan M Davis jmdavisProg at gmx.com
Sat Jan 15 01:02:54 PST 2011


On Saturday 15 January 2011 00:49:10 Walter Bright wrote:
> Jonathan M Davis wrote:
> > On Friday 14 January 2011 23:57:05 Walter Bright wrote:
> >> Jonathan M Davis wrote:
> >>> I'm wondering what the point of marking modules as scheduled for
> >>> deprecation really is - at least the way that we've been doing it. I
> >>> can understand marking a module as scheduled for deprecation if
> >>> there's a planned replacement but no actual replacement yet in order
> >>> to warn programmers that that module will be going away. However, at
> >>> present, we seem to be using it to just tell programmers to use a
> >>> replacement which actually does exist. That being the case, why are we
> >>> marking them as scheduled for deprecation rather than just deprecating
> >>> them? Having the pragma tell people what to use instead is certainly
> >>> good, but I don't quite get why we've been marking modules as
> >>> scheduled to be deprecated when we have a clear replacement for them
> >>> and are telling programmers to use the replacement. Why aren't we
> >>> actually deprecating them and then just using the pragma to indicate
> >>> which module to use instead?
> >> 
> >> Because it allows users to update their code on their own schedule,
> >> rather than ours. It's very annoying to have your builds break for
> >> reason X when you are hard at work developing Y.
> > 
> > True, but isn't that what -d is for?
> 
> Deprecation is a multi-stage process. I don't want to make them change
> their makefiles without warning.

So, essentially, the idea is to annoy them with pragma messages for a while, 
giving them warning that they're going to have to either add -d to their 
makefiles soon or change their code. Then you actually deprecate the stuff, so 
they if they didn't take the time to change either their makefiles or their code, 
their code won't compile anymore. And then finally, you remove the deprecated 
item entirely, so if they haven't changed their code by then, it won't compile.

I figured that just deprecating and then removing the symbol in question was 
plenty, but if we really want that extra step where they're effectively getting 
warnings before it becomes an error, then that's how we'll do it I guess. I just 
didn't see much point in just a message rather than actually deprecating the 
symbol or module.

- Jonathan M Davis


More information about the phobos mailing list