[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: An unexpected effect of new 'deprecated' tags.

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Thu, 28 Aug 2008 10:48:29 -0500

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

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.