unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Bruce Korb <bkorb@veritas.com>
Cc: guile-user@gnu.org, mckelvey@users.sourceforge.net
Subject: Re: SCM_LENGTH ???
Date: Mon, 10 Jan 2005 10:03:10 -0800	[thread overview]
Message-ID: <200501101003.10523.bkorb@veritas.com> (raw)
In-Reply-To: <ljmzvhxkj1.fsf@troy.dt.e-technik.uni-dortmund.de>

On Monday 10 January 2005 09:26 am, Marius Vollmer wrote:

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

That's a cute idea.  I like it!  I confess, I don't remember it from the last
time I went through the Guile docs.  When was that?  '99 or '98?
Have the docs changed much since then?  ;-)

> > 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.

Well, 1.4 is old enough that requiring something newer isn't a problem
for me.

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

However, it is a bit premature to use scm_c_*_length functions since
1.7.x is a test release series and 1.8 is not available.  :)  Thank you
for restoring the compatibility stuff!

> >> 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. :-)

OK.  A feature then.  Whether a feature or a bug, it breaks my released
software.  :-(

> > 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.

1.4 is adequate for my needs (though I agree it is old enough to
not worry about anymore).  So, I want to build to an interface that
works for either 1.6 *or* 1.8 and I would really hope for binary
compatibility between them as well.  Once 1.6.x has been dormant
for a couple of years, *then* one can stop fretting over clients
still using the thing.

> > 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.

To me, this still feels like grubbing around in internals and I do wish
you all were willing to supply something that approximates it.
I loathe having this in my code:

SCM
ag_scm_c_eval_string_from_file_line(
   const char* pzExpr, const char* pzFile, int line )
{
    SCM port;

    {
        static const char zEx[] = "eval-string-from-file-line";
        SCM  expr  = scm_makfrom0str( pzExpr );
        port = scm_mkstrport( SCM_INUM0, expr, SCM_OPN | SCM_RDNG, zEx );
    }

    {
        SCM file = scm_makfrom0str( pzFile );
        scm_t_port* pt = SCM_PTAB_ENTRY(port);
        pt->line_number = line - 1;
        pt->file_name   = file;
    }

    {
        SCM ans = SCM_UNSPECIFIED;

        /* Read expressions from that port; ignore the values.  */
        for (;;) {
            SCM form = scm_read( port );
            if (SCM_EOF_OBJECT_P( form ))
                break;
            ans = scm_primitive_eval_x( form );
        }

        return ans;
    }
}

> 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.

Excellent.  Thank you.

Regards, Bruce


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2005-01-10 18:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1CmxC0-0003DB-Gx@sc8-sf-web1.sourceforge.net>
2005-01-07 17:31 ` SCM_LENGTH ??? Bruce Korb
2005-01-07 18:07   ` Marius Vollmer
2005-01-07 18:27     ` Bruce Korb
2005-01-10 17:26       ` Marius Vollmer
2005-01-10 18:03         ` Bruce Korb [this message]
2005-01-10 20:59           ` Greg Troxel
2005-01-11 18:08           ` Marius Vollmer
2005-01-11 23:40             ` Kevin Ryde
2005-01-12 10:33               ` Marius Vollmer
2005-01-10 20:34         ` Ken Raeburn
2005-01-11 16:12           ` Bruce Korb
2005-01-11 18:32           ` Marius Vollmer
2005-05-14  2:52           ` deprecated symbol warnings Ken Raeburn
2005-05-14 12:40             ` Neil Jerram
2005-05-14 18:48               ` Ken Raeburn
2005-05-15  3:17                 ` John W. Eaton
2005-05-15 10:19                   ` Neil Jerram
2005-05-16  5:52                   ` Ken Raeburn
2005-05-18  4:22                     ` tomas
2005-05-18 12:20                     ` Ludovic Courtès
2005-05-18 17:17                       ` automated testing (was Re: deprecated symbol warnings) Ken Raeburn
2005-05-26 18:58                 ` deprecated symbol warnings Neil Jerram
2005-05-28 21:55                   ` Ken Raeburn
2005-05-18 19:18               ` deprecated symbol warnings and Windows Ken Raeburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501101003.10523.bkorb@veritas.com \
    --to=bkorb@veritas.com \
    --cc=guile-user@gnu.org \
    --cc=mckelvey@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).