From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Phillip Lord Newsgroups: gmane.emacs.devel Subject: Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs] Date: Fri, 08 May 2020 18:53:40 +0100 Message-ID: <87blmye2jf.fsf@russet.org.uk> References: <0c88192c-3c33-46ed-95cb-b4c6928016e3@default> <87wo5mc04t.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="22794"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (gnu/linux) Cc: Joost Kremers , emacs-devel@gnu.org To: ams@gnu.org (Alfred M. Szmidt) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 08 19:55:05 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 1jX7DD-0005ku-6Q for ged-emacs-devel@m.gmane-mx.org; Fri, 08 May 2020 19:55:03 +0200 Original-Received: from localhost ([::1]:46798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX7DC-0002Jk-95 for ged-emacs-devel@m.gmane-mx.org; Fri, 08 May 2020 13:55:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX7Cf-0001q0-E9 for emacs-devel@gnu.org; Fri, 08 May 2020 13:54:29 -0400 Original-Received: from cloud103.planethippo.com ([78.129.138.110]:36868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX7Ce-0003a3-5g; Fri, 08 May 2020 13:54:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=russet.org.uk; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=/d38Q/5pYjCcG6unBBBwbDR15bt8NHpDXQGA0wtGdcM=; b=q3gRJYzFWmUi6O5JFysuyk9xv 51m0P0UUk/dVLTMxy1Ax0uOBF78aUTHkas9XxhryaJoRStEiod7OzFpb/6SKVIrNFRvV9oXa949sr dkJQgmrttmaf6rXIzDA5pfi7f50Ma0gF6b8dPzXWh7GTZA0ArXVwsRt7lnitlDfFf3LhWLSfm68qX QmO5OXz5S1NyqiLse88kIWrtORae1fa8vVuPa4gEHCGq7taUngfAshyIx4VpfyNxR49h4zJs8klnx 8pAq4XTGRtNNksWiW30zqZB9N7wfHl2zHlz+hJJJYgz6uaEewSWDzik8KO2x5CnXUwGOShHyQeflZ /NOqYfNKQ==; Original-Received: from cpc142652-benw12-2-0-cust953.16-2.cable.virginm.net ([82.21.43.186]:44844 helo=russet.org.uk) by cloud103.planethippo.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jX7Bw-00008E-CN; Fri, 08 May 2020 18:53:44 +0100 In-Reply-To: (Alfred M. Szmidt's message of "Fri, 08 May 2020 06:41:44 -0400") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cloud103.planethippo.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - russet.org.uk X-Get-Message-Sender-Via: cloud103.planethippo.com: authenticated_id: phillip.lord@russet.org.uk X-Authenticated-Sender: cloud103.planethippo.com: phillip.lord@russet.org.uk Received-SPF: none client-ip=78.129.138.110; envelope-from=phillip.lord@russet.org.uk; helo=cloud103.planethippo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/08 13:53:45 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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:249305 Archived-At: ams@gnu.org (Alfred M. Szmidt) writes: > But you just described what dash does. ;-) It is just a collection > of list-handling functions such as they exist in modern functional > programming languages. If you're used to thinking in this paradigm > and then come (back) to Emacs Lisp, it feels like a hopelessly > clunky language. `dash.el` was written to remedy this. > > Thank you, I was and still am unsure what the purpose of dash.el is! > It is simply not somehing I would ever find myself using. > > While I'm very much used to programming in functional langugaes, the > way that Clojure and Haskell do it is very much alien to me. And > quite often, confusing to follow and reason about (IMHO). > > While some might prefer that, they do not seem well fitting for Emacs, > how you program in Emacs Lisp and how Emacs Lisp is intended to be > used. Personally, I find dash very comfortable to use, because I can stop thinking about loops, and think more about expressions. Of course, the addition of seq.el a couple of years back has bought that to. pcase.el has provided some of the other things in dash (as well as more). Indeed, I wrote my own library, so I could stop thinking about loops when manipulating buffer contents. An dash.el anaphoric macros are nice also, and save typing `lambda' a lot. Finally, dash just adds a lot of things ready rolled. If the history of programming languages tells us anything at all, it is that languages tend toward higher and higher levels. Emacs could do with more of this. Consider: (while (re-search-forward "foo[ \t]+bar" nil t) (replace-match "foobar")) from the documentation. And, if you want to not nobble the user facing location of point (save-excursion (while (re-search-forward "foo[ \t]+bar" nil t) (replace-match "foobar"))) And, don't forget to beware what you are searching for and what you are replacing. Because if point does not advance, you'll loop for ever. I don't want to have to remember all of this. > > > or what to use it for. > > Well, you use it if you want to program in a Clojure-like style. > > Isn't that the crux then? > > I as a user want to program in an Emacs Lisp style, not Clojure-style. Emacs lisp is not a constant, of course. One of the joys of lisp having very little syntax it is possible to re-invent for different generations. Many people do find > As a user, I found many of the functions to have alien names, strange > behaviour and very unintuitve to use in the style that is Emacs lisp > (Classical Lisp?). But some functions seem useful, though with > non-Emacsy names and calling conventions. Yes, this is true. seq.el does a better job there. But, again, it assumes we cannot re-invent Emacs. The question is whether we should. 2million downloads for dash.el tells me many users think the answer is yes. Phil