guile-devel
[Top][All Lists]
Advanced

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

Re: Re-addition of deprecated stuff to 1.7.


From: Marius Vollmer
Subject: Re: Re-addition of deprecated stuff to 1.7.
Date: 17 May 2003 19:22:23 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Neil Jerram <address@hidden> writes:

> >>>>> "Marius" == Marius Vollmer <address@hidden> writes:
> 
>     Marius> Hi, I have started to re-add most of the things that were
>     Marius> deprecated in 1.6 and removed in 1.7.  I hope everyone
>     Marius> agrees that this is OK.
> 
> Yes, but can it be done in a way that the back compatible bits are
> kept separate from the core?

Yes, mostly.  When too much need to change just to support a re-added
deprecated thing, I'm not re-adding it.  For example, vcells are not
coming back.

> A while ago you mentioned something like _GNU_SOURCE, which seems
> exactly right to me.
>
> For example, an application would just say
> 
> #define _GUILE_SOURCE 1.6
> #include <libguile.h>
> 
> And a 1.7.x/1.8.x libguile.h would have something at the end like
> 
> #if _GUILE_SOURCE = 1.6
> #include <guile/compat-1.6.h>
> #endif

Hmm, I don't think I would want to include version numbers explicitely
in this mechanism.  I would say that when some code wants to be
compiled against the Guile 1.6 API, it should be compiled against
Guile 1.6.

But with a version specific switch, we can have conflicting APIs.  But
for that, I'd say, we should have one switch per conflicting feature.
And that switch could be deprecated over time...

To illustrate, consider the change from a two-arg version of scm_eval
to the three-arg one.  When making the decision to make that change
(instead of just adding a new function), we can offer a switch that
activates the three-arg version:


   /* old code, using two-arg eval */

   #include <libguile.h>

   -------------------
   /* new code, using three-arg eval */

   #define GUILE_ENABLE_THREE_ARG_EVAL
   #include <libguile.h>

Later, we can deprecate the 'enable' variant and prefer a 'disable'
one:

   /* old code, using two-arg eval */
   #define GUILE_DISABLE_THREE_ARG_EVAL
   #include <libguile.h>

   -------------------
   /* new code, using three-arg eval */

   #include <libguile.h>

And still later, we can just remove GUILE_DISABLE_THREE_ARG_EVAL and
let the old code fail.

>     Marius> The idea is that we should backwards compatability for a
>     Marius> longer time when it is easy enough to do.  I am adding the
>     Marius> things in as clean a way as possible, so that they do not
>     Marius> get in the way of the mainline code.
> 
> It's possible that I may have described what you are already doing,
> then :-)

Maybe... I try to only modify the files deprecated.c, deprecated.h and
deprecated.scm.  The rest of the code remains mostly untouched.

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405




reply via email to

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