From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Philippe Vaucher Newsgroups: gmane.emacs.devel Subject: Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs] Date: Sat, 9 May 2020 16:05:09 +0200 Message-ID: References: <0c88192c-3c33-46ed-95cb-b4c6928016e3@default> <87wo5mc04t.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="6237"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joost Kremers , Richard Stallman , Emacs developers To: "Alfred M. Szmidt" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 09 16:06:19 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 1jXQ7P-0001WM-33 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 16:06:19 +0200 Original-Received: from localhost ([::1]:49942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXQ7N-0004bf-J1 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 10:06:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXQ6l-0003MD-VQ for emacs-devel@gnu.org; Sat, 09 May 2020 10:05:39 -0400 Original-Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]:36061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXQ6k-0005x7-U9; Sat, 09 May 2020 10:05:39 -0400 Original-Received: by mail-lj1-x231.google.com with SMTP id u15so4669857ljd.3; Sat, 09 May 2020 07:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kyPbhfNsDm6nia6BS9Im+CaJGXYSXdAmvWWpJgkm8UY=; b=G0KxJHkaeq9bGNaA3qUircNCGxJ+SmjnkCP1PXoWFp6rcusg3J700ORjdFKyt0hu81 ckHv1+YKMeRL1eMB7neW9q6dstfedrawIUHsxtVCRvVgj8y0FvCSSlZ8NPHkXtPsTVP9 cSiO1nffFD/ff0ZBr3/vAGah9HFDcNeJXzhmM/Ny/LqvaB+kye6H87y4YugG4b5ubtKY OaKB2pTjinDULGjKFcmc1ciAXZHZ39amuMoDpTnU4fDQ9mP/rCooERsvWhypH5671pzH d7R3RAXhuZOgFuc/n17pQJT/5RFMO3jorrdEbajN5XF6LbdrU4PDAio8Mp+bNCpNYuNr flKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kyPbhfNsDm6nia6BS9Im+CaJGXYSXdAmvWWpJgkm8UY=; b=cVY+u1KeAdHEXJPRCnN8jUUj0ezJgieK99gvSnRMrVUbitxLQT5JUmeGYWHB7tL/qc nlb/fcqvpvmJqFETMZKjB1IIIHfB+KTvvQZGbi0v05VkGwNzx6BO4x/wAdb8ZKzClPI+ rfwXgT23/KXJaLrk2GX6soVPgpy9GLEZltcVWc6WqSXpR3j7a9if0TGg0Wi6QXy2dAdU FwKTUS5x+UpOuNwCSZ/FRJrvWuJ1a63OdN8O4Xouxys5YrH3UAA+vtA5glb8Z1yDciPB m9RHUhyy7g2W8AoWi543M1oZiuJN9OssJG/iY2vHUo9AfBnKyqGJDcBEOGpRkHxrSw02 myQA== X-Gm-Message-State: AOAM533SchzUgO8LnU1giCmNYSkmC60zhqXG8hj+nNcRI40RJjPCqcJY KpkAWNv0uTAiy502esKIASo5yjoBEqkYF2GgpBPpapOE X-Google-Smtp-Source: ABdhPJx0fWcD0ky8LDwDQmv1l8VbyUnPRRyqBNpc4e70je7iW5qxAkUq7aYLTwv1MhfUrMVMRxZzXQDGKfpPSWgYE1A= X-Received: by 2002:a05:651c:c8:: with SMTP id 8mr4578687ljr.182.1589033135954; Sat, 09 May 2020 07:05:35 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=philippe.vaucher@gmail.com; helo=mail-lj1-x231.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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:249439 Archived-At: > s.el has little point, it is thin wrappers around Emacs Lisp > functions, and it has been explained why it isn't suitable (as is). To me it has the point of discoverability. I understand it's not your position. I think both positions are reasonable. > dash.el is more interesting, but since that is not how you generally > write Lisp (in general), it is hard for me to find something I'd use > it for. And so far, nobody is willing to provide concrete examples on > that topic and instead telling everyone to just go and read the code, > I did -- still no clue what or how to use these functions in the > context of Emacs Lisp. > > Can you give some examples of using dash.el? Sure! I takes a bit of time to construct these so they'll come in a separate email. > That is a very naive view of the matter. > > Lisp is one of the oldest high level programming languages that allow > for higher order functions, s.el has nothing to do with that. > > dash.el adds interesting constructs that are available in other > langugaes, and some might be interesting to add in Emacs Lisp. FTR, I'm not saying high order programming is possible thanks to dash.el, I'm saying dash.el follows the "conventions" ones expect a high order programming language to use. It's probably not so much about the exact names but more about the grouping (namespaces) which makes it easy to "guess" or "look for" a similar name that you already know. > Well it'd be `s-capitalize` instead of `capitalize` but I think I > understand your point, you think in terms of what the name is now how > changing it is a burden. I think we disagree about what constitutes > going forward but that's ok. > > Adding s.el to ELPA isn't about changing any names, they are two > different topics. Renaming existing functions in Emacs is, and should > be, a long process that shouldn't be done lightly. > > s-capitalize is something different, and unrelated to the Emacs Lisp > function `capitalize'. s-capitalize does a downcase on all words > except the first one, that is not the behaviour of `capitalize'. The > corresponding function from s.el is s-titleize, which is a simple > alias for `capitalize'. Got me there! See, this is a good example: in clojure, ruby, python and I'm sure other languages too "capitalize" means "downcase the whole string but upcase the first character". Emacs's `capitalize` is usually absent from other languages, but when it exists it's named titleize (Ruby). I can see how wanting to rename capitalize to titleize makes people cry from the Emacs lisp perspective and how it feels silly from the "rest of the languages" perspective (that you have "titleize" but not "capitalize"). > This again mixes a different matters, one of higher order functions > and one of discoverability. Neither s.el or dash.el make Emacs lisp > more discoverable. Hum. Let's try to unify our vision by saying: it does not make the current Emacs core lisp functions a lot more discoverable, but for a significant number of people it'd allow them to quickly "understand" how to do things and code packages and thus increase the overall productivity ? Also personnaly when I want to know how to do something in plain Emacs lisp I go & look at the source of dash functions, so in a sense it improves "plain Emacs lisp" discoverability for me. > dash.el has some interesting functions for that, but could use better > function names for them, and removing the trivial aliases would be a > good start to maybe add them too Emacs (either via ELPA, or in Emacs > proper). > > The objection here isn't what these libraries provide, but _how_ they > provide it. As I mentioned before -- if these libraries would > concentrate on extending, not replacing, Emacs Lisp it would be a > different topic. > > Even the simple suggestion by RMS to call the library for clojure-lib > or similar for functions that follow the semantics from Clojure would > be vastly better. That makes it very clear that these are not > functions that follow the Emacs Lisp style. You made yourself very clear, thanks for the summary. Philippe