[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[KAHLE@Aquinas.Think.COM: common lisp question]
Date: Fri, 18 Sep 87 15:33:21 EDT
Date: Wed, 16 Sep 87 17:25 EDT
From: Brewster Kahle <KAHLE@Aquinas.Think.COM>
To: email@example.com, firstname.lastname@example.org
Moon: 1 day, 13 hours, 32 minutes since the last quarter of the moon.
I want to make a stucture that is printed as
#S(death-row :person 2 :crime 3)
but I want it to be readable by a machine that thinks
there is only the :person slot. ie
(defstruct (death-row :constructor 'something-special)
Basically I would like to specify the arguments to the constructor to be
(defun make-death-row (&rest keywords &key person &allow-other-keys)
is this possible? If it isnt then structures are limited as a
communication medium between potentially different software versions.
It's not structures that are limited, it's PRINT.
Suppose you chose to represent a death-row instance as a list with two
elements, CRIME and PERSON, in which the extractor for person was a
macro that expanded to CADR. Then you try to transmit that to a
software version that doesn't store CRIME, just PERSON, and uses CAR to
extract the person. It would still fail, although not quite at the same
time. The point is that you need to communicate at a higher level of
abstraction than the raw Lisp data structures represented by raw Lisp