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

Re: copy

If we adopt something like CommonLoops where all objects have an
associated class, then the Copy problem becomes factored in a different
way; that is, one independently decides for each class the response to
two messages, COPY and COPY-IN:

COPY  is the top level call.  It produces a copy if it can
	 e.g. a new cons pair, same symbol, but a copy of a named structure

COPY-IN  is the recursive call.  Each type determines whether to return
itself or a copy for inclusion in a larger structure.

The protocol suggested by dfm is probably the appropriate definition for
COPY-IN.  For named objects, COPY and COPY-IN would differ.  For CONSes
they would be the same, etc.