RE: Keywords in GOOPS methods

Maxime Devos via General Guile related discussions <[email protected]>
Newsgroups gmane.lisp.guile.user,gmane.lisp.guile.devel
Message-ID <[email protected]>
>Well, these particular examples aren't valid since GOOPS doesn't allow type specifiers for keyword arguments. (It's the same in CLOS.) Type dispatch is done *only* on the required arguments.

That’s a shame, it should support them IMO, it’s a major limitation if it doesn’t.

A variant with untyped keyword arguments:

(define-method (f (a <keyword>) (b <symbol>))
  (pk 'positional))

(define-method (f (#:key foo))
  (pk 'optional-keyword foo))

(f #:foo 'bar)

Who should win? Both are a quite specific match.

Best regards,
Maxime Devos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.