From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: transient Date: Wed, 29 Apr 2020 17:20:42 +0300 Message-ID: <837dxyz83p.fsf@gnu.org> References: <87368npxw4.fsf@bernoul.li> <87v9ljo5d0.fsf@bernoul.li> <87ftcnxu5m.fsf@bernoul.li> <83y2qezlpd.fsf@gnu.org> <83tv12zjx1.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="95001"; mail-complaints-to="usenet@ciao.gmane.io" Cc: adam@alphapapa.net, kyle@kyleam.com, jonas@bernoul.li, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Philippe Vaucher Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Apr 29 16:22:45 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 1jTnbp-000OaJ-Dk for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Apr 2020 16:22:45 +0200 Original-Received: from localhost ([::1]:50192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTnbo-0004Kl-EL for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Apr 2020 10:22:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46746) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTnaD-0002fR-W1 for emacs-devel@gnu.org; Wed, 29 Apr 2020 10:21:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:55996) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTnaC-0005bt-Ao; Wed, 29 Apr 2020 10:21:04 -0400 Original-Received: from [176.228.60.248] (port=3169 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jTnaB-0007Or-C9; Wed, 29 Apr 2020 10:21:04 -0400 In-Reply-To: (message from Philippe Vaucher on Wed, 29 Apr 2020 15:12:50 +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:248145 Archived-At: > From: Philippe Vaucher > Date: Wed, 29 Apr 2020 15:12:50 +0200 > Cc: Jonas Bernoulli , Emacs developers , > Adam Porter , Kyle Meyer , > Stefan Monnier > > > * https://www.gnu.org/software/emacs/manual/html_node/elisp/Association-Lists.html sometimes > assoc, > > alist-get, assq, copy-alist. How am I supposed to use `C-h f alist TAB` to discover the function I > want? I > > can't, I have to go to that webpage and read it all. > > I think "C-h d alist RET" is your friend. > > You miss the central point of my argument. I'm sorry to have missed that, but all I had was what you wrote: How am I supposed to use `C-h f alist TAB` to discover the function I want? >From that I assumed that I could use the fact that "alist" is part of what you did know. How could I have guessed this wasn't what you meant? > The problem is not that the doc is hard to find, it's that I *have* to > find it to know which are the related functions. If "alist" is not a keyword that could be used in this case, then what is? "associaion list"? something else? When one tries to discover functionality, one must start with something, we cannot start with nothing, can we? > It is much easier for the mind to think in terms of namespaces, here are examples from other languages: > > * https://clojure.github.io/clojure/clojure.string-api.html all string functions stored under string > * http://www.cplusplus.com/reference/cstring/ almost all string manipulation function start with "str" > * https://ruby-doc.org/stdlib-2.4.1/libdoc/fileutils/rdoc/FileUtils.html all file manipulation function are stored in > FileUtils:: > > I could go on but I think you should be able to understand my examples. I understand the examples, I just don't think you can expect the world to be so simple. in C++ has just 20 functions, and if you need to work with multibyte strings, you won't find them there, they are in , which doesn't even have "string" in its name. Let's take a simple example: shell-command-to-string. To which "namespace" it should belong, in your opinion? It is relevant to "shell", "commands", "programs", and "strings". And then there's the problem of having too many APIs in the same namespace, if it indeed includes everything relevant. > * autocompletion can help you guess the right function. > * searching for function names (C-h f) can help you find the right function. YMMV, but when completion shows me more than 2 dozen candidates, I'm infinitely annoyed, and usually give up in despair much earlier that I read the entire list. No single trick is perfect, so my conclusion is that we need all of them to discover what we want quickly and efficiently. I mention "C-h d" because people tend to forget about it.