From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: scratch/command 064f146 1/2: Change command to interactive ... modes Date: Tue, 16 Feb 2021 20:49:19 +0200 Message-ID: <83ft1v97bk.fsf@gnu.org> References: <20210213141225.11309.86562@vcs0.savannah.gnu.org> <0605ed62-a785-d190-caf2-2232e1db3b0f@yandex.ru> <87mtw6d480.fsf@gnus.org> <87eehid3k2.fsf@gnus.org> <87r1liblzb.fsf@gnus.org> <83y2fq9f0v.fsf@gnu.org> <87k0r8xl7y.fsf@gnus.org> <834kic9g0a.fsf@gnu.org> <8735xwvusc.fsf@gnus.org> <83v9as7xns.fsf@gnu.org> <87pn10ueld.fsf@gnus.org> <83r1lf9apm.fsf@gnu.org> <87a6s3vrnd.fsf@gnus.org> <83o8gj9a8o.fsf@gnu.org> <871rdfvq86.fsf@gnus.org> <83h7mb98g8.fsf@gnu.org> <87o8gjuaez.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dgutov@yandex.ru, stefankangas@gmail.com, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Feb 16 19:50:02 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lC5QA-0008Zc-Ey for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Feb 2021 19:50:02 +0100 Original-Received: from localhost ([::1]:60776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC5Q9-0004Nr-Gd for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Feb 2021 13:50:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lC5PO-0003YS-M0 for emacs-devel@gnu.org; Tue, 16 Feb 2021 13:49:14 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57977) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lC5PO-0001ZN-8R; Tue, 16 Feb 2021 13:49:14 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2827 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lC5PN-0008Rq-Sl; Tue, 16 Feb 2021 13:49:14 -0500 In-Reply-To: <87o8gjuaez.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 16 Feb 2021 19:36:52 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:264914 Archived-At: > From: Lars Ingebrigtsen > Cc: stefankangas@gmail.com, emacs-devel@gnu.org, dgutov@yandex.ru > Date: Tue, 16 Feb 2021 19:36:52 +0100 > > Eli Zaretskii writes: > > >> I take it that the conclusion to the question I asked ("is there a point > >> to having the .elc files be compatible when the .el files aren't?") is > >> "no, there's no point in that". > >> > >> Are we in agreement on that? > > > > No, we are not. > > Could you explain what your disagreement is on this point? That would > be helpful. I already explained that. You didn't agree with my arguments, so I see no reason to reiterate them. But that doesn't mean I agree. Having incompatible byte code is BAD. > I think that if mode tagging is something that is going to happen on a > large scale, the mechanism for doing this must be clear, easy and > maintainable. Tagging 97% of our commands with > > (defun foo () > (declare (completion foo-mode)) > (interactive "p")) > > seems like a much worse solution in the "clear and easy" dept than > > (defun foo () > (interactive "p" foo-mode)) > > Do you disagree with this? Yes, I disagree that the former is not clear, easy, and maintainable. We've been using similar constructs for years. There was also a suggest to use symbol properties. that is also something we use widely in Emacs, including in the new completion-default-include-p function (and in many other places). They are all good, clean, maintainable practices which we are using and will continue to use. I don't see why 'interactive' is better. In fact, I could make a case to the contrary: it is already a kind of magic, as can be clearly seen from its implementation. Explaining how it works needs quite a few words. So it isn't as clear as might appear at first sight.