This is the mail archive of the
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: <E12elh7firstname.lastname@example.org>
I like the new syntax as well, seems to make more sense, and (IMO)
The re-writing seems about as anlogous to the (define (func args) ...)
syntax as you're likely to get:
(define (foo bar) ...)
(define foo (lambda (bar) ...))
and for methods:
(define-method (foo ((bar <baz>)) ...))
(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 :)