guile-user
[Top][All Lists]
Advanced

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

Re: SCM_LENGTH ???


From: Marius Vollmer
Subject: Re: SCM_LENGTH ???
Date: Mon, 10 Jan 2005 18:26:42 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Bruce Korb <address@hidden> writes:

> Marius Vollmer wrote:
>
>> We are!  In fact, SCM_LENGTH is already deprecated in 1.6, but not in
>> a very verbose way.
>
> That is wrong.  A comment in an obscure document somewhere
> is insufficient notice.  You must do something to get someone's
> attention.

Yes, true.  In 1.7 it was deprecated in a verbose way, but I removed
it completely when redoing the string implementation because, well,
sometimes I just don't want to have that stuff in there any longer and
can't constrain myself properly... I have brought back SCM_LENGTH,
SCM_CHARS, and SCM_UCHARS.

The recommended way to check for deprecated features is to compile a
version of Guile with --disable-deprecated and compile/link/test
against that.

> I cannot control my clients.  They will use whatever is installed.

Which is not always going to work, period.  Programs do have
reqirements that must be honored by the clients of these programs.
The less requirements there are, the better, but it is unrealistic to
aim for zero requirements.  Requiring Guile 1.6 is very reasonable in
my view, especially since it is still maintained.  Guile 1.4 is also
still around (if not 'officially' whatever that means).

> They could (and do) still use 1.4.  Are these scm_c_*_length functions
> available in 1.6 (let alone 1.4)?

No.

> DO NOT DISCARD INTERFACES WITHOUT A _VERY_ LONG TRANSITION and
> please supply a bridge:
>
> # define SCM_LENGTH(e) \
>     (gh_string_p(e) ? scm_c_string_length(e) : scm_c_vector_length(e))

We had this in 1.7 for a long time, and yes, I should not have removed
it.  It is back now.

>> This version is guaranteed to contain serious bugs, and the publically
>> visible interfaces will almost certainly change before 1.8 is
>> released.  The 1.7 releases might be termed "selected snapshots".
>
> A disappearing interface is certainly a bug.

No, if the interface itself is buggy, I'd say removing it is a
feature. :-)

>> We are releasing it anyway to start testing the new features, and to
>> get feedback about how difficult or tedious it is to switch from Guile
>> 1.6 to this series.
>
> It is not possible to migrate released software.

You are not supposed to.  Just use 1.6 for the old releases and
require 1.8 for the new ones, if you see a benefit.

> Please ensure that *ALL* legacy interfaces are maintained.

Unfortunately, the legacy interfaces of Guile are problematic.
Traditionally, Guile has exposed lots of its internal implementation
details (such as the fact that strings, symbols, and vectors stored
their length in the same way), and because of the lack of clean
alternatives and also lack of proper documentation, people have made
use of these internals in their programs.  We try to slowly fix this
situation.

So, SCM_LENGTH is definitely deprecated and you need to stop using it
eventually.  The alternatives are hopefully much better and will stay
around much longer.

> P.S. please forgive my crankiness.  It's been a long week....Sorry.

No problem, posts like yours do make a difference.  Please keep them
coming!




reply via email to

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