[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: add-method when method exists
- To: common-lisp-object-system@SAIL.STANFORD.EDU
- Subject: Re: add-method when method exists
- From: Patrick H Dussud <DUSSUD%jenner.csc.ti.com@RELAY.CS.NET>
- Date: Thu, 14 Jan 88 08:15:51 CST
- In-reply-to: Msg of Mon, 28 Dec 87 14:53 EST from "David A. Moon" <Moon@scrc-stony-brook.arpa>
Date: Mon, 28 Dec 87 14:53 EST
From: "David A. Moon" <Moon@scrc-stony-brook.arpa>
Subject: Re: add-method when method exists
3)Should add-method become add-or-replace-method
I agree with the semantics, I would propose to keep the name as simple as possible.
If we qualify the name, people will expect to find other variations like
add-or-complain-method....
4) Precisely when are errors signaled
Since we allow forward references for classes, we need to allow illegal states
for generic functions temporarily.
The following code should be allowed:
(defgeneric trash (object)
(:documentation "destroy the contents of object"))
(defclass foo (bar) ...)
(defmethod trash :after ((object foo))
...)
(defclass bar () ...)
(defmethod trash ((object bar))
...)
At least add-method shouldn't complain if a daemon method is added and there is no
primary method.
Patrick.