This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: GOOPS: New syntax for `define-method'?
- To: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>
- Subject: Re: GOOPS: New syntax for `define-method'?
- From: Eric Moore <moore at chem dot cmu dot edu>
- Date: Tue, 11 Apr 2000 03:15:25 -0400 (EDT)
- Cc: guile at sourceware dot cygnus dot com
- References: <E12elh7-0005ab-00@mdj.nada.kth.se>
I like the new syntax as well, seems to make more sense, and (IMO)
looks prettier.
The re-writing seems about as anlogous to the (define (func args) ...)
syntax as you're likely to get:
for functions:
(define (foo bar) ...)
becomes:
(define foo (lambda (bar) ...))
and for methods:
(define-method (foo ((bar <baz>)) ...))
becomes
(add-method foo (make-method ((bar <baz>)) ...)
(hurm, be prettier if we redefined lambda to make-method and
specialized define on the 2nd argument for methods to do the right
magic. Which, although I was being facetious does have a kind of
elegant simplicity to it :)
-Eric