public inbox for guile-emacs@sourceware.org
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@red-bean.com>
To: Ken Raeburn <raeburn@raeburn.org>
Cc: guile-emacs@sourceware.cygnus.com
Subject: Re: guile and emacs
Date: Wed, 08 Sep 1999 12:57:00 -0000	[thread overview]
Message-ID: <npogfdfa9d.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <199908281821.OAA14563@raeburn.org>

If you want to see my implementation of the Guile multi-byte API,
check out jimb_mb_branch_1 of the guile-core module.

The internal representation is meant to be *identical* to that used by
Emacs 20.4, except for composed characters, which Guile will never
implement, and which even Emacs is removing in favor of a different
implementation.


I don't know Sperber's objections to conservative GC, but if it's the
usual fear that pointers will get dropped, or garbage will be
preserved, my experience with Emacs and Guile is that explicit root
marking is in practice *more* prone to GC-related bugs, by a large
margin.  I think that explicit root marking is impractical without
software tools to help verify that you've done things right.

For example, note that the code below is incorrect in Emacs.  Assume
all functions return Lisp_Object values:

	foo (bar (), baz ())

Suppose the compiler calls bar first, then baz.  While baz runs, foo's
frame holds a reference to bar's return value --- possibly the only
one.  If collection can occur in baz, then bar's return value will be
collected.  Instead, you must write:

	{
	  Lisp_Object temp = Qnil;
	  GCPRO1 (temp);

	  temp = bar ();
	  foo (temp, baz ());
	}

But for anyone who has not worked on both Guile and Emacs, these
arguments are anecdotal, and the usual way of thinking about program
design suggests the opposite conclusion.  So I don't know what to do.
Any suggestions?

I guess this is an inappropriate forum for this.  But I don't know
anyplace else where the choice between conservative and explicit root
marking becomes such an immediate issue.

  parent reply	other threads:[~1999-09-08 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-28 11:21 Ken Raeburn
1999-08-28 13:48 ` Mikael Djurfeldt
1999-09-08 12:43 ` Jim Blandy
1999-09-08 12:57 ` Jim Blandy [this message]
1999-09-08 14:30   ` Mikael Djurfeldt

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

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

  git send-email \
    --in-reply-to=npogfdfa9d.fsf@zwingli.cygnus.com \
    --to=jimb@red-bean.com \
    --cc=guile-emacs@sourceware.cygnus.com \
    --cc=raeburn@raeburn.org \
    /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).