emacs-devel
[Top][All Lists]
Advanced

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

Re: pcase defuns


From: Stefan Monnier
Subject: Re: pcase defuns
Date: Sun, 19 Dec 2021 14:05:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> Oh dear, my head becomes dizzy when reading their dispatch behavior at
> (info "(elisp) Generic Functions").  Well, I mean, the typical uses can
> be pretty easy to understand but if you mix and match different kinds of
> specifiers, it becomes unwieldy, like what happens when you have two
> methods where one specifies the first argument must be an integer and
> the other says it applies if the first argument is (eql 42) [where 42 is
> obviously an integer]?  I can't read a priority order between different
> kinds of specifiers...

When the specializers are "naturally nested" (i.e. if you take them as
sets, one set is a subset of the other), then the desired precedence is
pretty clear and cl-generic *should* obey that order (if it doesn't, it
should be considered as a bug, tho I wouldn't be surprised if someone
comes up with examples which we may decide not to fix).


        Stefan




reply via email to

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