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

of course you don't copy everything that includes that structure!!

    Date: 1985 February 06 17:41:06 PST (=GMT-8hr)
    From: Robert Elton Maas <REM at IMSSS.SU.EDU>
    To:   RAM at CMU-CS-C
    Re:   of course you don't copy everything that includes that structure!!

    > Query: Does a copier for a structure correctly copy all structures
    >        which include that structure?

    It's possible you had a typographic error there and said the exact
    opposite of what you meant, but I'll assume no typo and answer exactly
    what you said.

I think that you totally spaced what I was talking about, which was
structures and copiers as created by defstruct, with include meaning
defstruct inclusion.  Looking back at my message, I noticed that I
only mentioned Defstruct in the subject...

I have had some second-thoughts thought about the issue some since I
sent the message, but I still don't think that the answer is blatently

The thing that I realized is that if the canonical implementation of
defstruct copiers is the one that we have chosen, in which there is
basically one generic defstruct copier function that copies all types
of structures, then it is kind of silly to have distinct named copier
functions for each structure type, since there could just as easily be
one Copy-Structure function.

Presumably the rationale behind having distinct copier functions is
that they could be more efficient, since they could be specialized for
the particular structure that they copy.  The problem is that any
likely scheme for significantly specializing the copier function will
probably not have the property that subtypes (by inclusion) of that
structure are correctly copied.