From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Adding support for xref jumping to headers/interfaces Date: Tue, 28 Nov 2023 18:38:40 +0000 Message-ID: References: <87r0kw8nxu.fsf@catern.com> <3fe5a8cd-b355-d7eb-10ad-8846aef3387b@gutov.dev> <878r6mx1xc.fsf@betli.tmit.bme.hu> <90e4b9a7-3b51-587d-e317-b89e5d5464d9@gutov.dev> <87sf4scxax.fsf@betli.tmit.bme.hu> <77500777-aea2-14db-4aab-7a5dff43443b@gutov.dev> <00b85d5b-7878-4099-ab44-8200e153885d@gutov.dev> <635a84ec-bda3-2fb3-6e04-39bb1245f3e0@gutov.dev> <763ce2e1-7fda-47fb-f17f-c60205ef1488@gutov.dev> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ef4fc9060b3aba17" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35519"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Felician Nemeth , Spencer Baugh , emacs-devel , Eshel Yaron , John Yates , Ergus , Filipp Gunbin To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 28 19:39:46 2023 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 1r82zp-0008yH-5m for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Nov 2023 19:39:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r82z6-0001p1-DT; Tue, 28 Nov 2023 13:39:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r82z3-0001oo-Hf for emacs-devel@gnu.org; Tue, 28 Nov 2023 13:38:58 -0500 Original-Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r82z1-0006IX-PD for emacs-devel@gnu.org; Tue, 28 Nov 2023 13:38:57 -0500 Original-Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2c5b7764016so66844451fa.1 for ; Tue, 28 Nov 2023 10:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701196733; x=1701801533; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kdxh7jYFbbdPzAXUUF9THMq8QlOnyXqlwAPPfGy+SoI=; b=BU/46ngIgddelx6Nxt1C1uCutIiP5LgC3Lk4dpmWVsMM9bl/cwYJ2CHyba5q2g0eII 5JNKTLMr6PKbnv8C3B+NIlNuUokuuBKSZSyPpZv1PI+z9H8PdxDZkA+nnmTNxJbAgxzp MEist9pEVYlktnN0DoWAD6sg5LI1J3UWky5k8X6mvF/G5LVFA73ebgcPyDvp9nLwib6t ULQR9U8tBCNVOdibxcvH1WiDc3/zOx9s+2E9d+uEwzl7NOggREI6Hu4Twt5cKJ/rnQCS jbF538CskXuK3ofbzLy1QgTwIXpkE8yzAB0TSdGviudCIwAGffc+v5rgcMK4tnsccjLG r5qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701196733; x=1701801533; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kdxh7jYFbbdPzAXUUF9THMq8QlOnyXqlwAPPfGy+SoI=; b=pHR0lXC/oItGtdT53pYojRUSkCnoCx4EsQobSi+ldlmjDOQAIefyGXdFWFbje0CetX REBXHUnjeILDPuL/vXcUieZkpKYZ+FOrzA/RdofRwyiUn2oz3MGVCAm3a6ykePbSPB0p ltPHyfXW3M6m/qGxMfH3KyOoh7IFIkTptQ4Lofuqyq5q/ba6stkcCXTrXQ2mpVyXe8xr S08bNrScWQ52l6BhVBwYCuhltFgSY1Emfl33nT1DPBqk4x47zY2+OxdS3mQ8Vnv2hZSa GXJc5saxE8hjWEbOxld+jMZPJXm/fguMjq8/MYFYT1b7KYU+iiTvpgAoPHbLBldrDFgc Ijdw== X-Gm-Message-State: AOJu0YwchXdviK06fgpE4Jo0J1pn3Y0Zx6YuFIq0I0nSzKYp1wwizOxF S5or0EuaTilyxLlC4k+AMbLZP4NfUhOhj98SJLA= X-Google-Smtp-Source: AGHT+IHIBmM2uwwVaZO0jOWekoH00HC78XzaftBcqeRF62HLd0LJs1F5W/97Lo8jPJ7+0++Nko7WBSlgUUHJ/a96VAM= X-Received: by 2002:a05:6512:1143:b0:50b:ac13:2275 with SMTP id m3-20020a056512114300b0050bac132275mr5970789lfg.25.1701196732516; Tue, 28 Nov 2023 10:38:52 -0800 (PST) In-Reply-To: <763ce2e1-7fda-47fb-f17f-c60205ef1488@gutov.dev> Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=joaotavora@gmail.com; helo=mail-lj1-x234.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313336 Archived-At: --000000000000ef4fc9060b3aba17 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Nov 28, 2023, 17:25 Dmitry Gutov wrote: > On 28/11/2023 19:16, Jo=C3=A3o T=C3=A1vora wrote: > > On Tue, Nov 28, 2023, 16:33 Dmitry Gutov > > wrote: > > > > Being able to rename, or change arguments, or split into several, o= r > > severely rework, are all benefits of using internal functions, whic= h > > are > > thus taken away. > > > > > > No. And you can't come up with an actual scenario that reveals a proble= m > > you wouldn't have when compared to a function interface. > > I said that introducing a macro requires a public function anyway. > Just because you said it doesn't mean it's true. It's not, that's not required at all. Again, you can't come up with a real upgrade scenario where the technique I presented is in any way more problematic than a normal function interface. Look, I don't care about xref anymore, I'm really just defending this technique from your so far 100% unsubstantiated discredit because it's really a standard watertight technique for presenting macros to a library's user, and I'd like people here to be aware of it, so the usual problems of call site recompilation become things of the past. I've used it tens of times, and seen it used many more. It's also known as the "CALL-WITH" idiom. The only situation where it "fails" is when you're using macros for speed, which functions don't give you anyway, and the indirection negates that. And you rarely should be using macros for that reason anyway, certainly not in these types of interfaces. --000000000000ef4fc9060b3aba17 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Nov 28, 2023, 17:25 Dmitry Gutov <dmitry@gutov.dev> wrote:
On 28/11/2023 19:16, Jo=C3=A3o T=C3=A1vora wrote:
> On Tue, Nov 28, 2023, 16:33 Dmitry Gutov <dmitry@gutov.dev
> <mailto:dmitry@gutov.dev>> wrote:
>
>=C2=A0 =C2=A0 =C2=A0Being able to rename, or change arguments, or split= into several, or
>=C2=A0 =C2=A0 =C2=A0severely rework, are all benefits of using internal= functions, which
>=C2=A0 =C2=A0 =C2=A0are
>=C2=A0 =C2=A0 =C2=A0thus taken away.
>
>
> No. And you can't come up with an actual scenario that reveals a p= roblem
> you wouldn't have when compared to a function interface.

I said that introducing a macro requires a public function anyway.=C2=A0

Jus= t because you said it doesn't mean it's true. It's not, that= 9;s not required at all. Again, you can't come up with a real upgrade s= cenario where the technique I presented is in any way more problematic than= a normal function interface.

Look, I don't care about xref anymore, I'm really just defend= ing this technique from your so far 100% unsubstantiated discredit because = it's really a standard watertight technique for presenting macros to a = library's user, and I'd like people here to be aware of it, so the = usual problems of call site recompilation become things of the past. I'= ve used it tens of times, and seen it used many more. It's also known a= s the "CALL-WITH" idiom. The only situation where it "fails&= quot; is when you're using macros for speed, which functions don't = give you anyway, and the indirection negates that. And you rarely should be= using macros for that reason anyway, certainly not in these types of inter= faces.


--000000000000ef4fc9060b3aba17--