bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20420: 25.0.50; eieio methods with optional arguments now fail


From: Stefan Monnier
Subject: bug#20420: 25.0.50; eieio methods with optional arguments now fail
Date: Mon, 27 Apr 2015 00:43:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> This sounds like a more involved version of what Clojure does with
> multimethods (also implemented in emacs multi.el package [1])

I didn't know about Clojure's defmulti.  It's simple and elegant, I like it.

> If I understand correctly the dispatch function is like
> your generalizer.

Somewhat, yes.  It's a bit more complex than that because in CLOS (and
even more so in cl-generic) the code to compute the dispatch value
depends on the actual methods defined, so cl-generic's "generalizers"
are objects which describe which code to use depending on which methods
are defined, and the actual value on which we dispatch is in general not
quite the same as the "premise" (i.e. the "specializer"), so the
generalizer also provides code to compute the specializer from the
dispatch value.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]