[Top][All Lists]

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

Re: "fall-through" generic function args plus &context

From: Stefan Monnier
Subject: Re: "fall-through" generic function args plus &context
Date: Mon, 26 Dec 2016 22:36:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> Come to think of it, how does one override `cl-no-applicable-method' for
> a specific generic?

Good question.

I guess in CLOS, this works by creating a new class that derives from
the standard "generic function" class, then make your generic function
be an instance of *that* class, at which point you can then define your
`cl-no-applicable-method` method which specializes on the class of the
`generic` argument.

But currently cl-generic does not support this notion of "generic
function" quite the way CLOS does (for one our "generic functions"
objects are `defstruct` rather than `defclass` objects, and also
they're not callable so the function cell is yet different (a fairly
standard closure)).


reply via email to

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