From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: tramp-compat-funcall -> compat-funcall? Date: Thu, 22 Sep 2016 16:18:17 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87h997u1rq.fsf@lifelogs.com> References: <87lgykci0z.fsf@lifelogs.com> Reply-To: emacs-devel@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1474576720 826 195.159.176.226 (22 Sep 2016 20:38:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 22 Sep 2016 20:38:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 22 22:38:36 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnAlK-0007TR-JZ for ged-emacs-devel@m.gmane.org; Thu, 22 Sep 2016 22:38:30 +0200 Original-Received: from localhost ([::1]:33247 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnAlI-000714-Vl for ged-emacs-devel@m.gmane.org; Thu, 22 Sep 2016 16:38:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnAgj-00038Y-JU for emacs-devel@gnu.org; Thu, 22 Sep 2016 16:33:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnAgg-0005Cx-Ef for emacs-devel@gnu.org; Thu, 22 Sep 2016 16:33:44 -0400 Original-Received: from [195.159.176.226] (port=48323 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnAgg-00053p-6g for emacs-devel@gnu.org; Thu, 22 Sep 2016 16:33:42 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1bnAS4-00070U-Gg for emacs-devel@gnu.org; Thu, 22 Sep 2016 22:18:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 24 Original-X-Complaints-To: usenet@blaine.gmane.org X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Cancel-Lock: sha1:pvDdW3awvRASDPcU6U5hwFKpIhk= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:207715 Archived-At: On Thu, 22 Sep 2016 08:31:22 -0400 Stefan Monnier wrote: SM> I think hiding this behind (tramp-)compat-funcall would be better SM> avoided (just like using with-no-warnings should be avoided whenever SM> possible). SM> IOW, if there's a kind of situation that recurs often enough to warrant SM> something like (tramp-)compat-funcall you should report this as a bug. The use case, I think, is "to provide compatibility with older Emacsen, I need a convenient way to call a function softly without compiler warnings if it doesn't exist." I think, based on the two examples I gave (`gnus-funcall-no-warning' was the other instance), that it's not an uncommon need, and it's better to provide it in a core facility than ask package maintainers to implement it. If the use case is misguided, then what's the right way to call functions that are missing in 25.1 but are needed in 24.3 for example? Do we need a layered cond-like funcall instead, which tries several invocations (not necessarily with the same arguments) until one succeeds? In either case, the compiler warnings seem better silenced than active, unless none of the cases succeed. Ted