[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58563: 29.0.50; Generic functions and advertised-calling-convention
From: |
Stefan Monnier |
Subject: |
bug#58563: 29.0.50; Generic functions and advertised-calling-convention |
Date: |
Sun, 16 Oct 2022 11:08:54 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> 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
bug#58563: 29.0.50; Generic functions and advertised-calling-convention, Basil L. Contovounesios, 2022/10/16
bug#58563: 29.0.50; Generic functions and advertised-calling-convention, Stefan Monnier, 2022/10/16