Arfrever Frehtes Taifersar Arahesis wrote:
> 2008-08-28 05:44:38 Karl Fogel napisaĆ(a):
>> The new 'deprecated' tags produce a slew of warnings in our build now.
>> That's great -- in some places we're still using deprecated functions,
>> and those places need to be fixed.
>>
>> But even after we fix them all, there will still be warnings from the
>> compatibility wrapper functions. For example, imagine these:
>>
>> svn_foo_bar5()
>> svn_foo_bar4()
>> svn_foo_bar3()
>> svn_foo_bar2()
>> svn_foo_bar()
>>
>> How would we usually implement that compatibility stack? Like this:
>>
>> svn_foo_bar5() { ...; }
>> svn_foo_bar4() { return svn_foo_bar5(); }
>> svn_foo_bar3() { return svn_foo_bar4(); }
>> svn_foo_bar2() { return svn_foo_bar3(); }
>> svn_foo_bar() { return svn_foo_bar2(); }
>>
>> The discerning reader will spot the problem immediately :-).
>>
>> Now, what do we do to avoid being spammed with compilation warnings
>> for the rest of our lives? Just always reimplement everything in
>> terms of the newest function?
>
> +1.
An emphatic -1.
Reimplementing everything in terms of the latest function introduces a subtle
kind of code duplication that I'd rather avoid. And where there's code
duplication, there's bugs.
-Hyrum
Received on 2008-08-28 17:48:43 CEST