From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.erc.general,gmane.emacs.devel Subject: Re: Adding 'compat' from ELPA as an optional dependency to ERC Date: Tue, 19 Jul 2022 15:34:44 -0700 Message-ID: <871qugu3y3.fsf@neverwas.me> References: <87fsixw4co.fsf@neverwas.me> <87edyhrrw0.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23515"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Stefan Monnier , emacs-devel , Amin Bandali , emacs-erc@gnu.org To: Philip Kaludercic Original-X-From: emacs-erc-bounces+sf-erc-help=m.gmane-mx.org@gnu.org Wed Jul 20 00:35:04 2022 Return-path: Envelope-to: sf-erc-help@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 1oDvo0-0005sM-0u for sf-erc-help@m.gmane-mx.org; Wed, 20 Jul 2022 00:35:04 +0200 Original-Received: from localhost ([::1]:44172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDvny-0001zp-Fw for sf-erc-help@m.gmane-mx.org; Tue, 19 Jul 2022 18:35:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDvnu-0001zL-Sy for emacs-erc@gnu.org; Tue, 19 Jul 2022 18:34:58 -0400 Original-Received: from mail-108-mta73.mxroute.com ([136.175.108.73]:46353) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDvnq-0003R9-SB for emacs-erc@gnu.org; Tue, 19 Jul 2022 18:34:58 -0400 Original-Received: from filter006.mxroute.com ([140.82.40.27] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta73.mxroute.com (ZoneMTA) with ESMTPSA id 18218997b980000261.003 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Tue, 19 Jul 2022 22:34:48 +0000 X-Zone-Loop: 6e9838eebf8c9fe32b2166846c858ec8fac9576e26f1 X-Originating-IP: [140.82.40.27] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=+zUStTWbe5tT3X4L7tBpziuqD5ikMYsLedn6QVpSbY0=; b=BGKB7IXEQORr/TDAPEmqxzYn/w hjO90/3OXbkUuIckjqUjerzAg3Z97lQFIemqhIQsCd4VX6VI/5PWX06WJ9krjRaEdvJQbBW1SrKec tkR00FwZ4KsA/qOd0KPURpJzo0sdfqjN4rj4VVnVOiaNMpyIblzGzVq2Ma0sJlQCi+WtSbgqzP16F J1Fb0rnuRUXGTU80waxwW7AZm7KAf8TlIjdYdwkA91i896YIXbSL0ByqhvLVw4RHX1KN4OlWlflJU dzz/GZTHKHKFo/J+0Rf1HnYOMTXCHkfvxZ4KwCkSJzW5wTUV6PM5sBjUvUzGtvVNRZ3eeHVmAvETY UtTM6x0w==; In-Reply-To: <87edyhrrw0.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 19 Jul 2022 16:25:51 +0000") X-AuthUser: masked@neverwas.me Received-SPF: pass client-ip=136.175.108.73; envelope-from=jp@neverwas.me; helo=mail-108-mta73.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-erc@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General discussion about ERC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-erc-bounces+sf-erc-help=m.gmane-mx.org@gnu.org Original-Sender: "emacs-erc" Xref: news.gmane.io gmane.emacs.erc.general:1883 gmane.emacs.devel:292295 Archived-At: Hi Philip (and Stefan), Philip Kaludercic writes: > By explicitly loading > compat-28, one would additionally load "prefixed" definitions for > functions that add new features to existing functions. > > E.g. consider how assoc acquired a new optional argument "TESTFN" in > version 26. One would either have to advise the existing function, > which was regarded to be too invasive and dangerous, or to define a > separate function underneath the `compat-' prefix -- `compat-assoc'. > > This function is not made visible by loading `compat', and explicitly > ought not to be in this case, as someone using the in-tree version of > ERC would not have no such function defined. In this sense the support > compat can provide for core packages is limited, but as it seems for > ERC's requirements sufficient. I suppose we could always add prefixed definitions down the road if really needed, perhaps to spare us from having to copy some complicated backport definition in full. Although, I believe doing so would also define compat- prefixed variants in all versions of Emacs, the idea being to save third-party packages from having to do stuff like (defmacro erc-compat--json-parse-string (string &rest args) `(,(if (fboundp 'compat-json-parse-string) 'compat-json-parse-string 'json-parse-string) ,string ,@args)) But in ERC's case, there'd be no avoiding this kind of indirection. (Please correct me if that's a flawed understanding.) Thanks, J.P.