Re: Generic interfaces Lassi Kortela 23 Jul 2021 11:48 UTC

Thanks for the extensive writeup. The main point I'd like to raise is to
that there's a strong precedent in Lisp dialects of using generic
functions for this kind of thing. We once pontifcated with John that GFs
are probably the key feature that sets Common Lisp apart from its
predecessors Maclisp and Emacs Lisp.

In Common Lisp, GF dispatch is done via CLOS classes. Some Scheme
implementations (e.g. Gauche, STklos) already have a CLOS-like object
system and generic functions to go with it. Kawa and IronScheme plug
into the Java and C# object systems in their target VM, which are also
classic OO, and those schemes do method dispatch that way. Clojure also
uses JVM objects, and also its own trait system IIRC.

I'm very much in favor adding operations on abstract datatypes into the
canonical set of Scheme procedures (on some timescale, no rush). But if
we do, we should do it in a way that is compatible with CLOS, JVM, and CLR.