From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Imports / inclusion of s.el into Emacs Date: Fri, 1 May 2020 21:47:26 +0300 Message-ID: References: <266155d4-f9c0-8ed3-8df5-32feea171076@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="40328"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: Emacs developers To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 01 20:48:20 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 1jUahw-000AOM-5D for ged-emacs-devel@m.gmane-mx.org; Fri, 01 May 2020 20:48:20 +0200 Original-Received: from localhost ([::1]:50248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUahv-00059A-6N for ged-emacs-devel@m.gmane-mx.org; Fri, 01 May 2020 14:48:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jUah9-0004at-TP for emacs-devel@gnu.org; Fri, 01 May 2020 14:47:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUah8-000723-Qb for emacs-devel@gnu.org; Fri, 01 May 2020 14:47:31 -0400 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:45249) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUah8-0006uG-Bg for emacs-devel@gnu.org; Fri, 01 May 2020 14:47:30 -0400 Original-Received: by mail-wr1-x435.google.com with SMTP id o27so7200736wra.12 for ; Fri, 01 May 2020 11:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=vCSjIVCNl9KGvcs1yxcZ8XSaU6MvBMHG7fMe7xiEbLY=; b=KQ2jqM9yfSKfJn9o6+5aoQ5/1CQPZ6Y192P95cd8jwgFc02QoY88FDGaUY5MMHU6vx fob0/+QOjw34udRo8eC7LM97aGK4HKBjMLk1ue+GKLlPqa29WWMOghb3PutoHMg88vXY HJekzseiwolA1e+5JJGUxKpa2q0Hf/2x21CrBngTzJlHSaMd6ZWcu9CvvnxyVPWEXxnp TJIvbjFcb/rIvN7hX2Iumap2fJ/LvcqeJPfoDdY4Kzg3GsjbGdYh1G4MXGWt5LNrDxsZ xuGPAN/fuXa/ESGGSEE1e0H34C60AWW+A5PdiuIPeffg4dKiXCCqWR+Nyyp41VCEPBO4 WfEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=vCSjIVCNl9KGvcs1yxcZ8XSaU6MvBMHG7fMe7xiEbLY=; b=WOR0ZzQHFAKB4VmktMfA/n4PZxSw9CL3Xmjmw7LTrRjjP5/g4cKV1sXCFfBp5mZchD 0l7hweC+rVmY5FH0rOZS3y1zIhJIRITeYq+H3QRw0HKz8PesBJ9y+p2ofFVSsC7CENBu yTRwnq/SV0CkEhO8eS0udLNdsmzE6VIdM9TP79lhcoPHJipO2aGc4UCr3JWIOiZIaQdJ ssCsHxBcGmJsyLUlkkkP6UPRzpbqbIg1mQvUuRwc0vO3td4Q2/mmwVjM9VJ6WivxSE0b Gx+eGvA+BNDIx7jyWiWV+4JKAkrAhPd+5X0vjcxKJBcqrPHDX29Pt+FJBcJ9qKTF7F0J aRWA== X-Gm-Message-State: AGi0PubhOS4T9rPgEqUdEXuRok3wXx81Y4YVK8kv0Vyh7W8tkd3SQ58W 7ew93lOxHFBVgqVA7E6LvmN5lYPJE54= X-Google-Smtp-Source: APiQypKNwJDoPhKdQg/0A3pOdouUouJUm7nltVP7AIoXT5ZyDDqXRHYin0ttHqqoKgUvgUH5CbtjGQ== X-Received: by 2002:a5d:4711:: with SMTP id y17mr3118017wrq.49.1588358848666; Fri, 01 May 2020 11:47:28 -0700 (PDT) Original-Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id i25sm569346wml.43.2020.05.01.11.47.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 May 2020 11:47:28 -0700 (PDT) In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=raaahh@gmail.com; helo=mail-wr1-x435.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::435 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:248336 Archived-At: On 01.05.2020 21:05, Philippe Vaucher wrote: > I'll try to explain my side first so you see where I'm coming from. So, > I guess a lot of s.el users think it's a massive improvement over what > emacs has to offer reguarding string manipulations. This is visible in > issues like https://github.com/magnars/s.el/issues/88. I imagine this impression might come purely from seeing a set of these functions collected in one place. And not necessarily from including all the helpers as well. > I never coded > with clojure, but my argument for these helpers is that in code we do > string manipulations all the time, they are trivial to write, so why not > have trivial helpers. The criticism would be exactly the same: if they're trivial, why have them in the library at all. > I understand there's a limit to such helpers > because you could write thousands of them, so good taste should be used > to introduce "the minimal set". Exactly. We do have some of them in subr-x already. We can add some more, though I'd only pick the non-trivial ones, among those that are likely to be used. > I usually don't care about these extra > function calls, what matters more to me is how beautiful the code looks > and how readable it is. Often, I'd agree. But the tradeoffs when creating the standard library of the language are somewhat different, IMHO. > Because string manipulation is so trivial, I'd like them to be > grouped together so they are easy to find. In other languages I can > usually go to one page and have the list of all strings related > functions. In Emacs the manual at > https://www.gnu.org/software/emacs/manual/html_node/elisp/Strings-and-Characters.html while > helpful makes it hard to "read it all" and find what you are looking > for. For example I couldn't find concat on that page. I fully support your criticism here. The old-timers will tell you to use the manual (from Emacs), but we both know that a lot of user are still much more likely to resort to a web search, and there the manual is not so great (no index, at the very least). > From your side, I understand that your definition of the minimal set is > much thiner, and maybe what would help is to give the complete list of > the functions you find superfluous and why (list at > https://github.com/magnars/s.el so far you mention `s-prepend` and > `s-append`). For example I'd disagree if you said `s-left` and `s-right` > are not useful to import because it can be done with `substring`. I will respectfully refuse this invitation: I have other work to do. As for 'concat' being hard to find: adding a 'string-concat' alias (without any plans to remove the original) could satisfy both sides, maybe.