[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DEFSTRUCT copier query
- To: RAM@C.CS.CMU.EDU
- Subject: Re: DEFSTRUCT copier query
- From: Pavel.pa@Xerox.COM
- Date: Mon, 03 Nov 1986 15:57:00 -0000
- Cc: samalone@ATHENA.MIT.EDU, common-lisp@SU-AI.ARPA
- In-reply-to: Rob MacLachlan <RAM@C.CS.CMU.EDU>'s message of Mon, 3 Nov 86 10:54 EST
Date: Mon, 3 Nov 86 10:54 EST
From: Rob MacLachlan <RAM@C.CS.CMU.EDU>
Date: Monday, 3 November 1986 10:17-EST
From: <samalone at ATHENA.MIT.EDU>
(copy-bread (make-rye-bread :state 'stale :seeded-p nil))
A: #S(RYE-BREAD :STATE STALE :SEEDED-P NIL)
or
B: #S(BREAD :STATE STALE)
Since there doesn't seem to be any support for B, no one can
complain if you implement A, although it may not be required for
Common Lisp.
I can complain, and I would. I am strongly of the opinion that the
function COPY-BREAD here should always create a value of type BREAD, not
one of its subtypes. If you want to get the effect of A, let us create
a new function COPY that copies any Lisp value at all. It seems strange
to have several such functions, one for each section of the type space.
I claim that such a function, along with COPY-BREAD having semantics B
above, would provide all of the functionality desired in the cleanest
way.
Pavel