Thomas M. Breuel <tmb@arolla.idiap.ch> wrote:: As far as I can tell, ANSI-C and C++ are both fully garbage collectable: within the current language standard.

At least you would have to be very careful when the programmer copies the
value of the last pointer to some heap object to some memory region (e.g.
an unsigned char[]) and changes the order of the array elements, then
destroys the pointer. No more live reference is detectable by the
collector, but the programmer may copy back the pointer value (again
changing the byte order) and ... :-) I guess such manipulations would be
possible with the current standard.

: More precisely, I believe that you could compile ANSI-C to portable and: idiomatic CommonLisp (the main difficulty is pointers to automatic: variables).

I'm not sure whether C would allow changing addresses; if not, you'd have
to translate them into something else if your Lisp implementation uses a
moving collector, which is quite likely. This is surely possible, but
hardly very efficient - so why not use Lisp in the first place, with
better performance :-)
--
Marc Wachowitz
mw@gandalf.ki.fht-mannheim.de, 75742@novell1.rz.fht-mannheim.de
[It is my impression that an ANSI C program is allowed to copy a pointer to
a long and later back to a pointer of the same type. This sort of thing
makes it hard to find all the live data. -John]
--