From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Alfred M. Szmidt" Newsgroups: gmane.emacs.devel Subject: discoveribility [Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs]] Date: Sat, 09 May 2020 13:35:57 -0400 Message-ID: References: <0c88192c-3c33-46ed-95cb-b4c6928016e3@default> <87wo5mc04t.fsf@fastmail.fm> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="87584"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joostkremers@fastmail.fm, rms@gnu.org, emacs-devel@gnu.org To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 09 19:36:49 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 1jXTP7-000MhZ-Dk for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 19:36:49 +0200 Original-Received: from localhost ([::1]:47728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXTP5-00085E-Sz for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 13:36:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXTOR-0007Eb-OQ for emacs-devel@gnu.org; Sat, 09 May 2020 13:36:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56381) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXTOR-0004Zi-EH; Sat, 09 May 2020 13:36:07 -0400 Original-Received: from ams by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1jXTOH-0004a1-5y; Sat, 09 May 2020 13:35:57 -0400 In-Reply-To: (message from Philippe Vaucher on Sat, 9 May 2020 16:05:09 +0200) 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:249518 Archived-At: Since this is taking a turn of topic, into the realm of discoverablity, I changed the subject. > 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. How does it make it more discoverable? E.g., how is s-ends-with? more discoverable than string-suffix-p? When Emacs Lisp custom is to use -p for predicates, and to use the words suffix/prefix. To take a trivial example. I understand that from the point of view of a different language s-ends-with? might make more sense since you're assuming that it will do the same as in Ruby since they have the same name. And you will also assume that since one such function exists, there will be more similar functions that remind you of your previous experience in Ruby. But we should view it from the lense of an Emacs Lisp hacker, where discovering that one function for predicates is named with -p and some with ? will be a big mess. Where sometimes one uses ends/starts instead of suffix/prefix. > 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. Thank you, I'm looking forward to that! Emacs's `capitalize` is usually absent from other languages, but when it exists it's named titleize (Ruby). If you come from Ruby and assume that Emacs lisp is Ruby you will trip -- but they are not the same languages, one cannot expect them to behave the same. 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"). I think it makes people cry from an English language perspective too... One is an actual word, the other isn't! It also is misleading, since it will lower case all words follow the first one, where in an actual title one would expect things like subjects to be capitalize. E.g, the chapter title "Strings and Characters" -- we do not want it to be "Strings and characters"! 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. Why would you go to dash.el to understand what Emacs does? Isn't it just C-h f away to understand what any Emacs function is doing? How is the Emacs manual, or Emacs Lisp manuals not serving this purpose for you? Or any of the other features that Emacs provides to look up things.