From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: Add some aliases for re-related functions Date: Sat, 2 May 2020 23:51:13 +0200 Message-ID: References: <7976B8C1-AFC7-4662-B750-6492EB70C0D5@gmail.com> <20200502192908.GD6832@ACM> <20200502210912.GE6832@ACM> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000079015005a4b14d47" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="47059"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Emacs developers To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 02 23:52:15 2020 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 1jV03S-000C6b-Sf for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 23:52:14 +0200 Original-Received: from localhost ([::1]:47380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jV03R-0003DR-T6 for ged-emacs-devel@m.gmane-mx.org; Sat, 02 May 2020 17:52:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jV02w-0002nJ-Sa for emacs-devel@gnu.org; Sat, 02 May 2020 17:51:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jV02w-0001rH-6A for emacs-devel@gnu.org; Sat, 02 May 2020 17:51:42 -0400 Original-Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]:32948) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jV02v-0001od-Ob for emacs-devel@gnu.org; Sat, 02 May 2020 17:51:41 -0400 Original-Received: by mail-lj1-x22e.google.com with SMTP id w20so5980015ljj.0 for ; Sat, 02 May 2020 14:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SxX7DY6jEBKNK69Su+Pa76en1BzYYLVrDNjToRUFY8g=; b=oeM+P2ybZs9ATtCNL9kH00axsjJ8M3o4YeC3rV5pbgq4UM9/k0XhUSfqyDTRvqiDOA qjmeHncbOUu2MoRJ1pKxJ8w5uzcSI+28+cOquKdeyV02VN2QyaV/vqctPwo+40BkTK+7 cauXpvXWxlMnJqWF1MEwzMBI+vHEdChvUp2ezhy1KsgCZ33JQp3PdC2E5D9LFAHm3JxZ 2QlW7ILhPECaPHu6QXujhoVnacMZpwnBxO9u5E5iyMh0jYjYkDfl7k1t9poZ0kCGzacN irpiqLLj6FQJchnHOE3ZK2qh+1Z7d9/rkVwTkW/7q7YxUy33XejjqmFN+vOzSgMKO12R 0XzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SxX7DY6jEBKNK69Su+Pa76en1BzYYLVrDNjToRUFY8g=; b=moU8pie3OR8FYmFD9FOxolDfkqc8ZZJRjqbEs27QctJBr71n8zwW0fIDQGyYROWBed Fi/0+d0UhJE3lEq3qNTV+3DRpqTM4jWvmUq17XotK+n70MPSTfhL6rkA9NgE695nsf3p ADv62J4Ksyk6uvemGr3Y77SA9lFbU0nabqmbVgzozBnzxPRciTT07giw1jT/2CWFvd5H tQluCMuVdGCoBnQLrwTJoNDKFAQWatD3pSmnzBPmfVRz9QTmHuOeT9WzZwXKhXmbJthu r6nAiZae/QrzgAb1jAa+v0B0owfabSn4Fw9AbNDaoZmrHF73gTAxFKGvxPBqrk9vSwXS txng== X-Gm-Message-State: AGi0PuaOcupqDCCOn93YkWT6vLBy9+NBzKWrNfcuYAr+sJszaovRO8tt vbZFcEEdHH1SxV5Ga88h0iSjr7IT4U8/CGSql7A= X-Google-Smtp-Source: APiQypKXttAqadr73zwkDHXCNrfRrPnOBVyD+lkpwGFURTkOjM5r258evUpbr9JfsEIPNC6M+Dl0MosSgsIKwFJEGNM= X-Received: by 2002:a2e:700e:: with SMTP id l14mr6198646ljc.135.1588456299494; Sat, 02 May 2020 14:51:39 -0700 (PDT) In-Reply-To: <20200502210912.GE6832@ACM> Received-SPF: pass client-ip=2a00:1450:4864:20::22e; envelope-from=philippe.vaucher@gmail.com; helo=mail-lj1-x22e.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::22e 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:248590 Archived-At: --00000000000079015005a4b14d47 Content-Type: text/plain; charset="UTF-8" > > Just to be clear, you don't like aliases because if they were to be used > > you'd hate reading code using them, correct? > > (snip) > > > I mean you agree they won't take away your ability to use the old names? > > This old one! I disagree with you entirely, here. I debug other > people's code as well as my own. I'd have to put up with > "re-match-after-point" and friends, thus losing the ability to "use" the > current names. I think you misunderstood me there. Literally one sentence ago I said that you don't like aliases because you'd dislike reading code using them, so I understood your concern. I also find your definition of "use" a bit surprising, but ok I note that for you "use" means "write code with that name as well as read code with that name". In my definition it just means "write code with that name". > And there's a good chance some "helpful" person will decide it's time to > purge the traditional names from all code, including my code. That's indeed a valid concern. That said at the current pace of how things goes on that topic, I think even if *some* things were to change your code would still be untouched for at least 20 years :-) > Anyhow, why not look at existing examples from history? > > On 1991-07-25, Jim Blandy introduced the alias `search-forward-regexp' > for `re-search-forward'. Why? Lost in the mists of time. Possibly for > the same reasons people are advancing now - make all the search functions > begin with "search-" for supposed easier searching (of their names). In > master we currently have 3534 occurences of re-search-forward and 134 of > search-forward-regexp. Would anybody here argue that Emacs is the better > for these 134 alternatively named function calls? I'd say it was a > mistake, and there is nothing positive to offset the confusion. Interesting. Is one of the alias deprecated now? What prevents us from massively rename every search-forward-regexp to re-search-forward? I understand it's not your point but I don't understand why this isn't fixed yet. > Or `delete-backward-char' and its alias `backward-delete-char'. We have, > respectively, 5 and 36 uses. To me, this is just confusion, whatever the > original reason was for these aliases. Same question as above. > I say we shouldn't add to such confusion. That's an interesting point. At the same time it gives me this impression that following this logic everything is written in stone forever because any change would be confusing. --00000000000079015005a4b14d47 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> > Just to be clear, you don't like aliases bec= ause if they were to be used
> > you'd hate reading code using= them, correct?
>
> (snip)
>
> > I mean you agre= e they won't take away your ability to use the old names?
>
&g= t; This old one!=C2=A0 I disagree with you entirely, here.=C2=A0 I debug ot= her
> people's code as well as my own.=C2=A0 I'd have to put = up with
> "re-match-after-point" and friends, thus losing t= he ability to "use" the
> current names.

I think you= misunderstood me there. Literally one sentence ago I said that you don'= ;t like aliases because you'd dislike reading code using them, so I und= erstood your concern. I also find your definition of "use" a bit = surprising, but ok I note that for you "use" means "write co= de with that name as well as read code with that name". In my definiti= on it just means "write code with that name".
=C2=A0
> A= nd there's a good chance some "helpful" person will decide it= 's time to
> purge the traditional names from all code, including= my code.

That's indeed a valid concern. That said at the curren= t pace of how things goes on that topic, I think even if *some* things were= to change your code would still be untouched for at least 20 years :-)
= =C2=A0
> Anyhow, why not look at existing examples from history?
&= gt;
> On 1991-07-25, Jim Blandy introduced the alias `search-forward-= regexp'
> for `re-search-forward'.=C2=A0 Why?=C2=A0 Lost in t= he mists of time.=C2=A0 Possibly for
> the same reasons people are ad= vancing now - make all the search functions
> begin with "search= -" for supposed easier searching (of their names).=C2=A0 In
> ma= ster we currently have 3534 occurences of re-search-forward and 134 of
&= gt; search-forward-regexp.=C2=A0 Would anybody here argue that Emacs is the= better
> for these 134 alternatively named function calls?=C2=A0 I&#= 39;d say it was a
> mistake, and there is nothing positive to offset = the confusion.

Interesting. Is one of the alias deprecated now? What= prevents us from massively rename every search-forward-regexp to re-search= -forward? I understand it's not your point but I don't understand w= hy this isn't fixed yet.
=C2=A0
> Or `delete-backward-char'= ; and its alias `backward-delete-char'.=C2=A0 We have,
> respecti= vely, 5 and 36 uses.=C2=A0 To me, this is just confusion, whatever the
&= gt; original reason was for these aliases.

Same question as above.=C2=A0
> I say we shouldn't add to such confusion.

That&= #39;s an interesting point. At the same time it gives me this impression th= at following this logic everything is written in stone forever because any = change would be confusing.
--00000000000079015005a4b14d47--