[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I Still want INITIALIZED? !



Regarding a test for uninitialized components of structures:

Various people have suggested that I make an object called EMPTY and
initialize all components of every structure to be that object.  I
object because (a) that requires hacking MAKE-STYPE (at least the
DEFINE-STRUCTURE-TYPE syntax) to do the initializations or remembering
to do it for every structure, and (b) it means that the normal
error checking for refering to uninitialized slots is lost because
T's structure package doesn't know from EMPTY and would consider it
initialized.

This is also a problem because I didn't define some of the structures
I'm copying.  My real problem is trying to copy hash tables (from T's
MAKE-TABLE).  These are structures of some kind, but I have no
interest in setting any of their defaults (I suppose I could find
them using STRUCTURE-STYPE, etc.  but that's just a bad idea).  For
the time being, I've defined my own hash tables that are just objects
coating a T hash table.  They aren't STRUCTUREs and have their own
COPY method, so they work, but a general method for dealing with
uninitialized components would save me from having to do this for
everything T exports as a structure...

                                          Larry