GNU bug report logs - #58563
29.0.50; Generic functions and advertised-calling-convention

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Sun, 16 Oct 2022 10:25:01 UTC

Severity: normal

Tags: patch

Found in versions 29.0.50, 25.3.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 58563 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>, 58563 <at> debbugs.gnu.org
Subject: Re: bug#58563: 29.0.50; Generic functions and
 advertised-calling-convention
Date: Sun, 16 Oct 2022 11:08:54 -0400
>>> I wouldn't bother special casing this.
>>> I think it's OK to say that if you want an
>>> `advertised-calling-convention` you need to add a `cl-defgeneric`.
>>> This likely applies to most other `declare`ations, actually.
>>
>> Yes, good point.
>
> On the other hand, thinking about this a bit more -- it's not an
> uncommon thing to just use defmethod to without a defgeneric to just
> ensure that you're calling the function with arguments of the right
> type.  Making people add a fallback method (to error out on) would just
> be pointless noise for them.

A defgeneric without a body is *not* a fallback method.
It's just a declaration, really.


        Stefan





This bug report was last modified 2 years and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.