From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Sat, 11 Nov 2023 12:50:21 +0000 Message-ID: References: <25924.21015.19614.951576@orion.rgrjr.com> <87bkc4jpja.fsf@dataswamp.org> <8a7362da-3cc4-221c-7b8a-a9918677adff@gutov.dev> <877cmox1nr.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28743"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 11 13:48:17 2023 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 1r1nPN-0007L3-FE for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Nov 2023 13:48:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1nOk-000228-UM; Sat, 11 Nov 2023 07:47:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1nOg-00021j-FQ for emacs-devel@gnu.org; Sat, 11 Nov 2023 07:47:34 -0500 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1nOb-0006OP-Cu for emacs-devel@gnu.org; Sat, 11 Nov 2023 07:47:30 -0500 Original-Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-509c61e0cf4so2803587e87.2 for ; Sat, 11 Nov 2023 04:47:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699706847; x=1700311647; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/vnyhVoSdn+XDeU4p0VlsrGQg1s+8JeBHmm/8sKla/4=; b=HPV8TvcmcaDUq8MjzP0TzNdTC+QjUsS4eJzkYqVDtrj75KCQVs6pZ/fkP9EgDrOHUt EM8yCJKDpcELc9T+8obUksuqoe+RGv5VYA8Wk/Tjx10QHdbAe5QNeeCeaMI/gQi29yEJ t4YRKfRVCUQN7+L9U/81sb0Aacwuli5icq7uxses+/LvJvZIjOCyHlA4MOp3ZLv7iHqe zLMrOO3YwLakyiwKwCpTJ8nbFWw5dmbP6d955rKUX71iAupvAuLiC62LUNkr/lMu0TYW XKYDwRy24zoxqVCMwC8BXbpLxHS/aJZDDniGK8wO+IVaiLLAWQ+fiE7vTL5b9hOdccZQ 7G+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699706847; x=1700311647; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/vnyhVoSdn+XDeU4p0VlsrGQg1s+8JeBHmm/8sKla/4=; b=aCXdlYMJTnNDsp1CI76xmmlVJizYiWGcucYXBadpj8rbyqHrIaSyAe3PLkG9UifPzh HfO6LH/JPE5KxQgiH0MMGtJvVM5ZuQ35JcNjVm/AcH4BzY1gVY5FP3WmrjwXPj9PlkP4 lgPSiwTqzGZhKBhpTCLnpYRAw8BQ9iptRX1klwQEW1yBi7npQJt9l24QSuRp1fK18kpZ 3Wx9yHd41jWf1IVe8iJ3dBZyGR+gA+GTBQhLMUyX1RrYTImdo9p9p6euzQNHWkmivMSb WCfedXkUSZcisN/3BupgAKcmk9A+vt41hvABWtwgq4KsjxA/bzklwBHxJHXde7OPEUwC 6DNw== X-Gm-Message-State: AOJu0YxLQiyTLt/6Ft6TummjHnEjBa5Toc/wOzIiShDSv2NXPFV0sDEu Syy5o2qv8Cy/BD94dxvh3Y8vsOJeedSRa3P4SSR4xfFezZA= X-Google-Smtp-Source: AGHT+IEvlDRN0c19p/yZpIBsQmkWnd/U+lfZ5bEuvyCOXbXqBNkwcojNqG1L6SKPWDkl4U2QDd9JNlJHnRtTSz4+z5U= X-Received: by 2002:ac2:43c9:0:b0:503:90d:e0df with SMTP id u9-20020ac243c9000000b00503090de0dfmr1043349lfl.34.1699706847201; Sat, 11 Nov 2023 04:47:27 -0800 (PST) In-Reply-To: <877cmox1nr.fsf@web.de> Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=joaotavora@gmail.com; helo=mail-lf1-x132.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312549 Archived-At: On Sat, Nov 11, 2023 at 6:08=E2=80=AFAM Michael Heerdegen wrote: > > Jo=C3=A3o T=C3=A1vora writes: > > > I suggest cl-labels since you singled it out and some > > sequence manipulating functions which just say: "Keywords supported: > > :test :test-not :key :start :end :from-end" but don't explain what > > each of those keyword arguments do. > > I dunno if this would fit in our concept, but it would be nice if those > functions supporting keywords had a link (or an initially folded > subsection) where the keywords are explained in a quick way. One needs > them too seldom to remember all the details until the next time. I think these keyword arguments are just like normal elisp optional arguments, they are just passed by name. So the same problems of writing/explaining them apply. As to whether keyword arguments are intrinsically needed more or less frequently than optional arguments is IMO, very debatable, and entirely dependent on the function. Again, just like optional args. I don't think I've ever used read-from-minibuffer's optional KEYMAP arg, for example. Or INHERIT-INPUT-METHOD to completing-read. I use :KEY and :TEST quite often for cl-lib sequence less frequently :FROM-END and even less frequently :TEST-NOT. Where I can agree with you is that is seems a bit suboptimal to re-describe -- specifically for CL keyword arguments, _not_ keyword arguments in general -- the semantics of the elements of the standard set :KEY, :TEST, :FROM-END, etc. I.e. there could be some shortcuts to help facilitate this writing in cl-lib.el, maybe some special docstring construct. But copy-pasting it's not that horrible either, and they can be summarily described in single line with consistent style between the functions that use them. Jo=C3=A3o