From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Add some aliases for re-related functions Date: Sun, 3 May 2020 12:47:01 -0700 (PDT) Message-ID: References: <7976B8C1-AFC7-4662-B750-6492EB70C0D5@gmail.com> <29721725-0696-4dcf-b5de-36924a5de259@default> <3777996c-7b3f-4d44-9636-f18aaff76a65@default> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="16508"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Stefan Monnier , Emacs developers To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 03 21:49:30 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 1jVKcD-0004BL-7r for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 21:49:29 +0200 Original-Received: from localhost ([::1]:39428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVKcC-0005vt-Az for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 15:49:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVKZz-0004A0-0f for emacs-devel@gnu.org; Sun, 03 May 2020 15:47:11 -0400 Original-Received: from userp2130.oracle.com ([156.151.31.86]:41714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVKZv-0003jB-SN for emacs-devel@gnu.org; Sun, 03 May 2020 15:47:10 -0400 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 043Jdger010882; Sun, 3 May 2020 19:47:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=R3K9cGYO3QR8LRRcI4rgHGsSMgjIz/ChUUQeM1ECLKo=; b=do61cN8VdCuIIiSo7I5/KPt4iWiUcmftGwl5/z8NWykYVI8nX9Ns7foc5Mw+KYkxjp7N yFVQKWwUSYCKpKC5bqG8WBheCkMtMauRaObg/VkBTvUvgaBmtOPHVrlK4dE6PAy3WGol s3xmAZzYNwjHlMsC3QiL2qHV4AyqcSZLX4B3dP3aSJQaM2HMcCCKnS/KgBaHyejIsSe/ BBPcve+Fr+htTxJlPV+bHgD0lvxaNkZSlO/ZWjY5w3vxzcQIyOC9ytn9friPug0oVWGX A0zF+lgyX+e+Nj+hgIox97yEH6El3Qu282S+HZEEiTxPumicC9tOT3tXBC3xTbKRRYht xQ== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 30s09qv0aw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 03 May 2020 19:47:04 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 043JbEnm117122; Sun, 3 May 2020 19:47:04 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 30sjn829ra-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 03 May 2020 19:47:04 +0000 Original-Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 043Jl2ko008201; Sun, 3 May 2020 19:47:02 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4993.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9610 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005030176 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9610 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 phishscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005030176 Received-SPF: pass client-ip=156.151.31.86; envelope-from=drew.adams@oracle.com; helo=userp2130.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/03 15:47:06 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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:248738 Archived-At: [Again, please consider using plain-text, not HTML, in your messages.] >> It wasn't intended to be taken literally.=C2=A0 But >> the point behind it (there was one) was just >> that naming is hard.=C2=A0 It's not easy to find a >> reasonable and consistent way to name things, >> including functions.=C2=A0 (I think we agree about >> that, at least.) > > Yes, naming is one of the hardest thing. Still when we see names that cou= ld be improved and where most agree shouldn't we try? Certainly we should. We should try on a case-by-case basis, not apply a presumed general rule with a broad brush. (And yes, Stefan, I realize that no one is saying to paint _everything_ with the same brush. It's a difference of scope/degree.) > You make it sound like because naming=C2=A0is hard > bad names are ok How did I make it sound like that to you? > or that any new name will be barely better > as naming is hard. Again, how did I make it sound like that to you? > If I strawman your position we could name every > new function as function5318759 with an incremental > number because hey naming is hard we might as well > give up :-) I wonder what, in anything I've written, could possibly give rise to such a strawman extension in your mind? > I'm joking of course :-) If you look at the particular half-kidding examples I showed, you might see that they're not screwball. Nearly all of them are perfectly reasonable. And that's the point of showing them. With a command such as `flush-lines', if we want to prefix the name, just what is a good prefix? Is the command mostly about lines (the type of data acted on), so perhaps use prefix `lines-'? Is it mostly about regexp-matching/searching, so perhaps use prefix `re-'? Is it mostly about deleting text, so perhaps use prefix `delete-' (as in one of its aliases)? The question's a good one. It suggests we should examine function names case by case. And it suggests there are multiple possibilities, and it's a judgment call about what's most important for the name. Nowhere do I suggest we shouldn't try to get the best names possible, just because there may not be any perfect or correct name (impossible, as Stefan said) or because finding the best name fit is hard (as he also said). I agreed with that characterization (in fact, I emphatically applauded his phrase "hard and impossible"). Clearly, neither I nor Stefan thinks that just because it's hard, and ultimately impossible, we shouldn't bother to get the best names we can find (agree on). https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg01975.html