From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: master 87e422f: Beef up the Emacs string utility set a bit Date: Tue, 22 Dec 2020 16:03:23 +0100 Message-ID: <8984B3E5-1DBF-46D3-85BA-6599095F1C06@acm.org> References: <20201221175345.27592.89597@vcs0.savannah.gnu.org> <20201221175347.9F1B820B76@vcs0.savannah.gnu.org> <87eejjdn8e.fsf@gnus.org> <87a6u7dmnw.fsf@gnus.org> <84D3EA2C-C81C-4056-AE71-0458905F231D@acm.org> <87h7od99se.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21478"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 22 16:04:53 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 1krjDZ-0005Jy-9o for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Dec 2020 16:04:53 +0100 Original-Received: from localhost ([::1]:40370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krjDY-0000Lh-C4 for ged-emacs-devel@m.gmane-mx.org; Tue, 22 Dec 2020 10:04:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krjCF-0008CR-Fb for emacs-devel@gnu.org; Tue, 22 Dec 2020 10:03:31 -0500 Original-Received: from mail174c50.megamailservers.eu ([91.136.10.184]:53064 helo=mail36c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krjCD-0002q9-1r for emacs-devel@gnu.org; Tue, 22 Dec 2020 10:03:31 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1608649405; bh=pqJHxTV+kACt6QoqvwL4e2rUzn8rIpf2fFEGLMt1tEg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=URxdu7LDF654LpANYGjTvvYTdiKePndoijZUIyrA3/fldE4KZuRsU575OnnV9yT+d 38J7oQJAIOS2Dj7hMBg1bK/2fEqCHGG50gLMj6I2GqBPvw03tuM5VGPo0nPjiMAKIb k76UvEQvUD9bGGC5e+nbmV60xtGyCYudfo01wcrE= Feedback-ID: mattiase@acm.or Original-Received: from stanniol.lan (c-064ae655.032-75-73746f71.bbcust.telenor.se [85.230.74.6]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 0BMF3NUp028295; Tue, 22 Dec 2020 15:03:25 +0000 In-Reply-To: <87h7od99se.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F1F.5FE20ABD.00A0, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=OrUxNB3t c=1 sm=1 tr=0 a=Ni+dBsiEfW2GqKMPYZim9A==:117 a=Ni+dBsiEfW2GqKMPYZim9A==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=L-1d4Owak405IFAcivkA:9 a=CjuIK1q_8ugA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.10.184; envelope-from=mattiase@acm.org; helo=mail36c50.megamailservers.eu X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no 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:261493 Archived-At: 22 dec. 2020 kl. 15.48 skrev Lars Ingebrigtsen : > I'm not really enthusiastic about any of these names. When we're > talking about suffixes, we're usually talking about file name suffixes > like ".png", and this has nothing to do with that. Suffix and prefix are (in computing and mathematics) generic terms for = the trailing and leading parts of a sequence such as a string. There's = nothing in the words that ties them to file names. > These are functions > for limiting the length of a string, and would be called > `string-truncate' if it hadn't been for `string-truncate-left' already > existing and doing something else, and `truncate-string-to-width' = doing > something else yet again. >=20 > That is, these functions are not for picking out a part of a string, = but > for limiting the length, which makes `string-prefix' misleading as for > what the intention is. Naming pure functions after what they return is standard practice. How = is that misleading? (And who are we to say what the user's intention is?)