[Openmcl-devel] [Re: MOP Question: structure of Lambda list for direct-slot-definition-class]
mb at bese.it
Wed Feb 23 03:56:20 EST 2005
Gary Byers <gb at clozure.com> writes:
> On Mon, 21 Feb 2005 rm at fabula.de wrote:
>> On Mon, 21 Feb 2005 17:31:17 +0000, Bruno Haible wrote:
>> > If you're using DEFCLASS, then the MOP says how slot
>> > options should be handled (http://www.lisp.org/mop/concepts.html):
>> > "All other slot options appear as the values of properties with the
>> > same name as the slot option. Note that this includes not only the
>> > remaining standard slot options (:allocation and :type), but also
>> > any other options and values appearing in the slot specification. If
>> > one of these slot options appears more than once, the value of the
>> > property will be a list of the specified values."
> The handling of MAG-STEP in the example in Figure 5.2 (AMOP p148) tends
> to confirm the interpretation that the values of non-standard slot
> options should only be collected into a list if they're provided multiple
i must be missing something. assuming that interpretation how would i
(defclass foo ()
((slot :value-type (ref something-else))))
(defclass foo ()
((slot :value-type ref :value-type something-else)))
the first form is valid, the second is an error. with openmcl's
current behaviour i have no problems checking and reporting a
meaningfull error, using clisp i can't tell the difference and my code
happily excepts bad input.
while i agree that this (listifying multiple values) is what the mop
says i don't think it's the best way to do things.
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
More information about the Openmcl-devel