From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58563: 29.0.50; Generic functions and advertised-calling-convention Date: Sun, 16 Oct 2022 11:08:54 -0400 Message-ID: References: <878rlgjcbl.fsf@tcd.ie> <878rlgjbwq.fsf@gnus.org> <875ygjj122.fsf@gnus.org> <871qr7j01z.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6320"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , 58563@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 16 17:17:29 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ok5OL-0001PD-06 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Oct 2022 17:17:29 +0200 Original-Received: from localhost ([::1]:48276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ok5OJ-0001vT-Ur for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Oct 2022 11:17:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ok5H9-0001Sa-9Y for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2022 11:10:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ok5H8-0007Lp-Dl for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2022 11:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ok5H8-0004xW-4K for bug-gnu-emacs@gnu.org; Sun, 16 Oct 2022 11:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Oct 2022 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58563 X-GNU-PR-Package: emacs Original-Received: via spool by 58563-submit@debbugs.gnu.org id=B58563.166593294518980 (code B ref 58563); Sun, 16 Oct 2022 15:10:02 +0000 Original-Received: (at 58563) by debbugs.gnu.org; 16 Oct 2022 15:09:05 +0000 Original-Received: from localhost ([127.0.0.1]:45886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok5GD-0004w4-4k for submit@debbugs.gnu.org; Sun, 16 Oct 2022 11:09:05 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:35283) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ok5GB-0004va-JP for 58563@debbugs.gnu.org; Sun, 16 Oct 2022 11:09:04 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D3BAC10013B; Sun, 16 Oct 2022 11:08:57 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8DD6B1000D0; Sun, 16 Oct 2022 11:08:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665932936; bh=sPkq1yTtWmdADfPRlOYBfGbPu94rMBHJJazEHP2Xekg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=lq4emY2oTaaTfmOGHjyKBnOPLXwFfqibl3Tjho4HZ7RbkPNu5BfshX/uW2psuDEuG zjZUXfxDKQEjhBxtEzRhG6v+VZS81Eyyp/x1q97WC/1momRCEIVVHA7ixsR97ZmhUI 94TCc3HySU818GP+LHNYVgiKmrWutGDQq43IUa6gWDkO6xwR/0g7s8RYpyqmBUtMe2 +lDxUaM/Ot7vddmVeunUY/YgpdQbn/ASGdPK34v+/rhvEuHCoxLOXqdt9VFKpQOMVs qHzTLUKQlsqq7JQY33h/9CEUW60D3O0XaiRocmRaFz1u9+IxKFqBhqYtKfSVeXzgES N0DKfWOtDQb8A== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3049812068A; Sun, 16 Oct 2022 11:08:56 -0400 (EDT) In-Reply-To: <871qr7j01z.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 16 Oct 2022 16:49:28 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245657 Archived-At: >>> 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