From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Add some aliases for re-related functions Date: Sun, 3 May 2020 17:14:30 +0000 Message-ID: <20200503171430.GE5721@ACM> References: <7976B8C1-AFC7-4662-B750-6492EB70C0D5@gmail.com> <20200502192908.GD6832@ACM> <20200502210912.GE6832@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="29149"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 03 19:15:11 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 1jVICt-0007QE-Ar for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 19:15:11 +0200 Original-Received: from localhost ([::1]:42080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVICq-0002tO-V3 for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 13:15:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVICL-00025i-0i for emacs-devel@gnu.org; Sun, 03 May 2020 13:14:37 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:65381 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1jVICJ-0004In-Ge for emacs-devel@gnu.org; Sun, 03 May 2020 13:14:36 -0400 Original-Received: (qmail 85030 invoked by uid 3782); 3 May 2020 17:14:31 -0000 Original-Received: from acm.muc.de (p2E5D57CC.dip0.t-ipconnect.de [46.93.87.204]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sun, 03 May 2020 19:14:30 +0200 Original-Received: (qmail 7670 invoked by uid 1000); 3 May 2020 17:14:30 -0000 Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/03 13:14:32 X-ACL-Warn: Detected OS = FreeBSD 9.x or newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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:248723 Archived-At: Hello, Stefan. On Sat, May 02, 2020 at 18:41:04 -0400, Stefan Monnier wrote: > > On 1991-07-25, Jim Blandy introduced the alias `search-forward-regexp' > > for `re-search-forward'. > Oh, right, I hate that alias. I've been confused by it. I don't love it either. > > 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). > Could be. I always assumed it was meant for M-x use (i.e. for > non-programmer users) rather than for use in Elisp code. > > 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. > I can also come up with bad examples. I don't think it makes it > undesirable to add aliases. Rather it argues for making sure you don't > forget to mark one of the two as obsolete. It doesn't make sense to introduce an alias and immediately mark it as obsolete. So I think you're suggesting that heavily used and well loved function names like looking-at and match-string should be marked obsolete. I'm unhappy with that. The proposed replacement names are worse for an important thing we do with Emacs (reading code and debugging it), and the whole reason for this proposed substitution seems to have got lost. The discussion ought to be about what we are trying to do, whether we should do it at all, and if so what ways there are of achieving this. Instead it seems some people have already decided to replace function names and are at the stage of proposing lists of replacements. This isn't good. > Stefan -- Alan Mackenzie (Nuremberg, Germany).