From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikael Djurfeldt To: Jim Blandy Cc: djurfeldt@nada.kth.se Subject: Re: guile and emacs Date: Wed, 08 Sep 1999 14:30:00 -0000 Message-id: References: <199908281821.OAA14563@raeburn.org> X-SW-Source: 1999-q3/msg00005.html Jim Blandy writes: > 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 think sharing your experience with precise vs conservative GC is one important thing. We could also try to sift the archives for discussions on this topic. I think it would be a really big mistake to settle for an interface compatible with precise GC if the problems with conservative GC are just phantoms.