Phobos - breaking existing code

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Fri Nov 28 17:57:08 PST 2014


Walter Bright:

>> Yes, it can be.

A solution is to leave @deprected stuff for 2-5 years in Phobos 
(but in few cases this is not enough, because some names have 
changed purpose and signature).


> 1. renaming things to the latest fashion is an illusion of 
> progress, not actual progress, such as fnmatch => globMatch

You are wrong. Having good function names is extremely important. 
Renaming badly named things with more clear and more meaningful 
names reduces pain for both old and new users, reduces coding 
time, and in some cases even avoids some troubles.


> 2. deprecated aliases to the old names can be kept for a long 
> time without causing problems

This is usually true, but not always (see above).


> 3. when removed entirely, the documentation for them should be 
> kept along with instructions on corrective action

I agree.

Bye,
bearophile


More information about the Digitalmars-d mailing list