Re: [CLOS] Ensuring a method exists
- From: Ken Tilton <kentilton@xxxxxxxxx>
- Date: Wed, 27 Sep 2006 13:35:08 -0400
Wade Humeniuk wrote:
Didier Verna wrote:
Hi !
Suppose I have:
(defgeneric foo (a b) ...)
(defclass base () ...)
(defmethod foo ((a base) (b base)) ...)
I'd like to ensure that if somebody writes a derived class:
(defclass derived (base) ...)
she also provides a method for this class:
(defmethod foo ((a derived) (b derived)) ...)
If someone defines the DERIVED class, how long do you give them
to define the foo method? The first time foo is called with
and instance of derived?? Or can they use the inherited method
until they determine how they need to specialize on derived.
What you are asking flies in the face of interactive dynamic
development. You need the fluidity/imprecision during development.
Maybe when "everything is finished" then you can run a consistency
check to see that everything is "proper".
I think I know what you want, if you could be more specific
as what you want to achieve.
Nothing. Apparently Didier and his buddy were in a pub early one morning and started arguing over whether Lisp could do anything C++ could do. As all the girls moved away from them, they hotspotted into c.l.l and made that post...
hth, kenny
--
Cells: http://common-lisp.net/project/cells/
"I'll say I'm losing my grip, and it feels terrific."
-- Smiling husband to scowling wife, New Yorker cartoon
.
- Follow-Ups:
- Re: [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- References:
- [CLOS] Ensuring a method exists
- From: Didier Verna
- Re: [CLOS] Ensuring a method exists
- From: Wade Humeniuk
- [CLOS] Ensuring a method exists
- Prev by Date: Re: [CLOS] Ensuring a method exists
- Next by Date: Re: [CLOS] Ensuring a method exists
- Previous by thread: Re: [CLOS] Ensuring a method exists
- Next by thread: Re: [CLOS] Ensuring a method exists
- Index(es):
Relevant Pages
|
|