[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: define-method syntax
From: |
Kalle Olavi Niemitalo |
Subject: |
Re: define-method syntax |
Date: |
15 Nov 2000 19:51:52 +0200 |
"Lars J. Aas" <address@hidden> writes:
> I find myself writing
>
> (define-method (method-name arg ...) body ...)
This syntax should actually work just fine in current GOOPS.
See the ChangeLog entries for 2000-04-12.
| guile> (goops-version)
| "0.1.7"
| guile> (define-method (frob (hah <number>)) (1+ hah))
| guile> (frob 10)
| 11
> Why was the syntax set to the latter? Is that how CLOS
> does it or something?
Yes, Lisp's DEFMETHOD and DEFUN keep the name separate.
In DEFMETHOD, one can even have other things between the name
and the argument list.