Stuart Hungerford schreef op ma 03-01-2022 om 10:46 [+1100]:
> Just out of interest, are there other multimethod/ad-hoc polymorphism
> approaches for Guile?

I only know of GOOPS and Theme-D -- Guix also has a
‘define-gexp-compiler’ but it's very ad-hoc.

It allows defining something like

(define (lower stuff system target)
  (cond ((derivation? stuff) stuff) ; done
        ((foo? stuff) (lower (lower-foo stuff system target)))
        ((bar? stuff) (lower (lower-bar stuff system target)))
        [...]))

(where 'lower-stuff' converts 'stuff' into something 'lowerable'),
but in an extensible way.

Greetings,
Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to