This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
gc-mistakes.txt
- To: guile at sourceware dot cygnus dot com
- Subject: gc-mistakes.txt
- From: Jorgen `forcer' Schaefer <forcer at mindless dot com>
- Date: Wed, 29 Dec 1999 14:08:44 +0100 (CET)
Hi there..
gc-mistakes.txt is a nice document and quite helpful, i just have
a few reccomendations on how to improve it :]
First of all, it's nice to know that something is bad, but it's
nicer to know why. gc-mistakes says "Do this and you'll lose the
object" -- it's not quite obvious the the newbie *why* you'll
lose it.
e.g.
> and make_new_foo_elts can cause a collection, then any number
> of foo elts can be dead by the time you actually use it.
it would be nice to add
> This is because the elements in foo_elts are not referenced
> anywhere and are not on the stack.
and to the fix add
> This works since we add the array to our object, which will
> mark the objects in the array.
It's quite tedious to find out such information yourself, and
probably impossible for "newcomers"...
Section 3 i still don't understand. If you get passed an object,
it's on the stack, right? So, why does one need to remember it?
And why ad the *end* of the function?
I hope for enlightenment :)
-- forcer
--
((email . "forcer@mindless.com") (www . "http://forcix.cx/")
(irc . "forcer@#StarWars (IRCnet)") (gpg . "/other/forcer.gpg"))