From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?7KGw7ISx67mI?= Newsgroups: gmane.emacs.devel Subject: Re: Imports / inclusion of s.el into Emacs Date: Sun, 3 May 2020 23:51:54 +0900 Message-ID: <0EF66D20-6EDE-427C-AF19-918E7003C85F@icloud.com> References: <87ftchy0go.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=utf-8; delsp=yes; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="82513"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , Emacs developers , Lars Ingebrigtsen , Richard Stallman , Stefan Monnier To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 03 16:52:44 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 1jVFz1-000LJr-KW for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 16:52:43 +0200 Original-Received: from localhost ([::1]:55802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVFz0-0004n4-Ng for ged-emacs-devel@m.gmane-mx.org; Sun, 03 May 2020 10:52:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVFyO-0004Bp-Uq for emacs-devel@gnu.org; Sun, 03 May 2020 10:52:04 -0400 Original-Received: from pv50p00im-ztdg10012001.me.com ([17.58.6.51]:38749) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVFyN-0007cK-Nt for emacs-devel@gnu.org; Sun, 03 May 2020 10:52:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1588517519; bh=sAGjOmzB2PywFMwPFF+3wQb+uxXEN2Ot2RBSPQznjXQ=; h=Content-Type:Subject:From:Date:Message-Id:To; b=zPm3GGPxJ9GjqgEef9T2aAgcLJBchPiiQivLdHAFA5u4whiAeo4zTcq6DK1rYO8Ih KPI+56odscDBEBOTwqjNx36hXjps6+wzXJwLzl3yyC3Fj0XfjwOcbInKDuXtX7Bmz4 n86pgK/jRnxhbMz+Fp2WQZZpt8+Sp4eViP7Dz/AP7nBDZsjSu9J7MZ8XqVC8t/RG8S KA2x+NBLATnSsvcCMwktDqs30/6B1WapctlYBqjqmhyAt760sOMrUuPrMvlpez4MQe xLfnx2gmrlt+d3i6IMcXGhvwwxysUS8eH0wwigCutm9aVLiz20YQaoVcNOhOstlEwQ wPXNip1jF/QaA== Original-Received: from [192.168.0.2] (unknown [1.230.108.64]) by pv50p00im-ztdg10012001.me.com (Postfix) with ESMTPSA id 1C66028048C; Sun, 3 May 2020 14:51:57 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-03_09:2020-05-01, 2020-05-03 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-2002250000 definitions=main-2005030135 Received-SPF: pass client-ip=17.58.6.51; envelope-from=pcr910303@icloud.com; helo=pv50p00im-ztdg10012001.me.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/03 10:52:00 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, FROM_EXCESS_BASE64=0.979, KHOP_DYNAMIC=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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:248696 Archived-At: João Távora 작성: > On Sun, May 3, 2020 at 11:55 AM Stefan Kangas wrote: >> Philippe Vaucher writes: >> >>> Aliases: >>> >>> split-string aliased as string-split >> >> This is a better name. FWIW, I think the old one should be deprecated >> too. > > People coming from Common Lisp and not Clojure will find 'split-string' > more appropriate. > > Now really, I don't think this "prefix with the type name" makes > any sense. When I learned Lisp coming from Java, it bothered me, > yes. But I got over it, quickly. Functions in lisp are generic, or at least > duck-typed. If in Haskell or Ruby the name of the operated-on type > always matches the namespace qualifier, good for them I guess. I know > 0 Haskell, but last I checked those Ruby functions aren't top-level > functions, they're methods on a String object. So that just reflects a > different way to look at OO. I often use it when in those languages, but > in Lisp there's a different take to it. So the namespace qualifier doesn't > necessarily bear any direct relation to type of the object being operated > on [1]. Sometimes it does, yes, but it's accidental. Shoving this foreign > convention down Lisp's throat is cruel. And ignorant, sorry. (ignorance > isn't a defect, it's a default). OK, so nobody is really forcing that ’split-string’ should be aliased as ’string-split’. What people want, is *not* a OO-based naming scheme - it just needs to be consistent. If you think ‘traditional’ Lisps should follow a verb-noun scheme for non-polymorphic functions and only verb for polymorphic functions, then that’s fine. Then the user can predict that… when one wants to split a string, one can search it with ones that start with ’split’. The problem here is current Elisp isn’t predictable enough. Is it string-trim or is it trim-string? Is it string-join or is it join-string? Is it string-split or is it split-string? And that’s the problem this proposal is trying to solve. BTW, a quick check from sly shows me that cl:split-string doesn’t exist - while cl:string-trim, cl:string-left-trim, cl:string-right-trim exists. Which probably means that it’s not really a foreign convention in Lisp. (And Elisp already adopted the convention of prefixing the module name in the front, which was the reason this discussion started.) > The point of doing it, I suppose, is that it > would bring in lots of newcomers onboard. But shouldn't we rather be > welcoming them by efficiently showing them them the joys of > Javalessness instead? Seriously, a consistent std is *not* Java. See almost every programming language - consistency is something that people value. It’s not always the answer, but it’s something that people value & appreciate. > Do we need a manual with pretty pictures > and fancy fonts? Let's do it then. > > OK, ranting over. In CL-land, there is the very good split-sequence[3], > which is a generalized split-string (and compatible with the "split the > empty string" case). I propose we get that instead. If we're lucky, that > CL code is directly translatable to Elisp (seems to be from a cursory > inspection). Yeah call it seq-split if you really must drink the kool-aid. > > [1]: The lack of a package system in Elisp (not package.el, mind you > that's a different thing) adds to the confusion, but it's really the same. > [2]: http://quickdocs.org/split-sequence/ > > João