guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: define-generic-safe


From: Neil Jerram
Subject: Re: define-generic-safe
Date: 22 Aug 2002 21:25:41 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Clinton" == Clinton Ebadi <address@hidden> writes:

    Clinton> It doesn't seem like define-generic should do (make
    Clinton> <generic> #:name ,name) for a generic when you
    Clinton> define-generic on an existing generic. There should
    Clinton> probably be something like a destroy-generic! procedure
    Clinton> to erase a generics methods, but since that doesn't exist
    Clinton> I modified define-generic to create define-generic-safe
    Clinton> that doesn't do anything to the generic if it is already
    Clinton> a generic. This is just a simple one line change, but
    Clinton> other people might find it useful.

Isn't this the same as what `ensure-generic' does?  (See oop/goops.scm
in the distro.)

For example: (ensure-generic + '+)

        Neil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]