Subject: Simultaneous generational GC and error-check immutables?

From: "M. Thomas" <[email-masked]>
Date: Tue, 6 Dec 1994 14:39:46 -0500 (EST)

I recently compiled CLISP from the latest source (in source-haible
directory), under Linux 1.1.54, following the instructions to enable
better error-checking of immutables.  (I assume I automatically got
generational garbage-collection.)

But the following sequence of forms gives no error message (return values 
omitted here):

> (defvar temp-string "Matson")
> (setf (char temp-string 0) #\W)

and now temp-string evals to "Watson".

A recent poster to this list inquired why evaluating the (setf ...)
produced an error -- my CLISP does _not_ produce the error, hence my
question. 

There seem to be three likely reasons for this behavior:
  (1)  I did something wrong in trying to enable immutable error-checking;
  (2)  I misunderstand what error-checking of immutables really means;
  (3)  Error-checking of immutables and generational GC can't be had at 
       the same time.  (This is suggested by the existence of two Linux 
       binaries in the binaries/linux directory ... Hmmmm ...)

Thanks for the enlightenment!

Mark A. Thomas
[email-masked]

---

From: haible (Bruno Haible)
Date: Thu, 8 Dec 94 16:36:55 +0100

Mark Thomas <[email-masked]> tried this:

> ... following the instructions to enable

No, you didn't get generational GC; CLISP does not yet support immutable
checking and generational GC simultaneously.

> But the following sequence of forms gives no error message

Immutable checking is only done for immutable objects whose printed represen-
tation has been read from a file, using LOAD. I felt it would be annoying,
especially for beginners, to get errors when evaluating forms like
  (nreverse '(a b c))
  (nstring-upcase "My Name")
interactively.

                    Bruno Haible
                    [email-masked]