Let's talk about deprecations

bachmeier via Digitalmars-d digitalmars-d at puremagic.com
Mon Jul 3 06:04:46 PDT 2017


On Monday, 3 July 2017 at 11:30:14 UTC, Jonathan M Davis wrote:

> Ultimately, the way that folks find out about needing to change 
> their code is compiling it and seeing the deprecation messages 
> - or getting compilation errors if they wait too long, but 
> that's a _lot_ more of a pain to deal with than the deprecation 
> messages, so we really don't want to rush the removal.

Something that has worked well for me in other languages (in the 
few cases I've encountered it) has been renaming deprecated 
functions rather than removing them. So rather than foo, the 
function becomes foo_legacy. If foo disappears, the fix is simple 
- change the name to foo_legacy. I try to do that myself, because 
it's not unusual to run across code I haven't used in a few 
years, or code I gave to someone else a few years ago, and you 
don't even remember what the function does, much less how to fix 
it.


More information about the Digitalmars-d mailing list