guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handling deprecated features


From: Dirk Herrmann
Subject: Re: Handling deprecated features
Date: Tue, 8 May 2001 16:14:10 +0200 (MEST)

On 8 May 2001, Marius Vollmer wrote:

> Dirk Herrmann <address@hidden> writes:
> 
> > On 29 Apr 2001, Marius Vollmer wrote:
> > 
> > > Therefore, what do you think of providing this interface to the user:
> > [...]
> > >    #ifdef SCM_ENABLE_DEPRECATED
> > >    ...
> > >    #endif
> > 
> > Do you think that SCM_ENABLE_DEPRECATED should replace
> > SCM_DEBUG_DEPRECATED, or what is the idea behind the SCM_ENABLE_DEPRECATED
> > macro?  Maybe some warning message system like for the scheme level?
> 
> Oops, I think I was confused about names.  I wanted to use the
> existing system with SCM_DEBUG_DEPRECATED, but I had to think about
> the polarity of SCM_DEBUG_DEPRECATED every time I used it.  Like, "I
> want to remove this code when deprecated features are not enabled,
> that is, when the user wants to debug his code for use of this
> feature, that is, when SCM_DEBUG_DEPRECATED is true, that is I have to
> check for SCM_DEBUG_DEPRECATED == 0 in the `#if' to include the code
> in the normal case."  While SCM_ENABLE_DEPRECATED would have fitted
> better with the way my brain is wired.  No double negations and stuff.

Yes, I think in a similar way.  IMO, we could rename this without problems
if it makes things easier.  When I introduced that identifier, we had no
clear concept yet about how it would work, and it was at first meant to be
a debugging feature for those who wanted to try if their stuff uses
deprecated definitions.  Now, I think, we are close to a very complete and
helpfull handling of deprecated features, and thus it appears that
SCM_ENABLE_DEPRECATED is a better name.

Nevertheless, a system for issueing warning messages when deprecated stuff
from the C level is used would also be nice...

Best regards,
Dirk Herrmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]