From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Advantage using mapc over dolist Date: Wed, 04 Dec 2024 00:57:12 +0000 Message-ID: <-3kwKQazB1dAqDtLNM1WpOU7qBSV8ihsV6GWlZcVe_m5m6xqvqGB0qi4dJ6eUWftCQIAoMzD1uDWc-id5UmKa4KtJO-BHZw_MFm_22q8lwI=@protonmail.com> References: <87zflevbwm.fsf@neko.mail-host-address-is-not-set> <87h67ku813.fsf@neko.mail-host-address-is-not-set> <87jzcg4i9b.fsf@neko.mail-host-address-is-not-set> Reply-To: Heime 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="40520"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tomas Hlavaty , help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 04 01:58:02 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1tIdiL-000AIX-IR for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Dec 2024 01:58:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIdhp-0002Zq-4y; Tue, 03 Dec 2024 19:57:29 -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 1tIdhl-0002ZW-AD for help-gnu-emacs@gnu.org; Tue, 03 Dec 2024 19:57:25 -0500 Original-Received: from mail-10699.protonmail.ch ([79.135.106.99]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIdhh-0007IW-QV for help-gnu-emacs@gnu.org; Tue, 03 Dec 2024 19:57:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1733273837; x=1733533037; bh=R7h5LX8Cu3dBdzsfbddjEcFB3HVQUUWz+fwPWLW4wqg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=Wzk87t6w4wQYdAG2rBhsFx6SMXRkCUhAOvBttggwDpMGAR0dY1/Q9PYopkD62Xj4F 9NCNbK0WemrV+UnqwVHq2/uCBjwFmlwmnBozRo6kzBkn/WpEWshcrZmSpYfl1gyMDn 9t97sB8LxNNLdSoB1UbkUtPC37EGmMgP4nd4E/dOGifpd3ZfBN2QCMNOR1hv7WrMZf 2qqRGyhLDDDJePX6Jf0iVP7uR1H+xvDI1vO6ojlLUY401dSzegSrJTSW39zWSw3moe iJlVb4ZwGDVy+ZQuwXL8FwDVCZ/6HOo986flG2WO/J+OOJBNEGtA5EkEbGuItzK9N2 +MfHZBPmEZyMw== In-Reply-To: Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 27113bcbbc8b3aea41b9afdefc9eaf05544b219d Received-SPF: pass client-ip=79.135.106.99; envelope-from=heimeborgia@protonmail.com; helo=mail-10699.protonmail.ch 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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148579 Archived-At: Sent with Proton Mail secure email. On Wednesday, December 4th, 2024 at 11:29 AM, Stefan Monnier wrote: > > > Richard was strongly opposed to the use of the CL package because of = its > > > "stepping" all over the ELisp namespace. For years, this manifested > > > itself in the fact that use of CL within Emacs's own code was general= ly > > > shunned and tolerated only with (eval-when-compile (require 'cl)), > > > meaning that you could use CL only when it could be compiled away dur= ing > > > byte-compilation (by macro-expansion and/or inlining). So you could u= se > > > `ecase` but not `some`. > > > How did you decide what should be renamed to cl-*? >=20 >=20 > Everything that was defined in the CL library. >=20 > > Why was IF not renamed to cl-if? >=20 >=20 > Because `if` was never defined in the CL library but in > `eval.c` (and the byte-compiler). >=20 > > Why do you think CASE is CL? >=20 >=20 > Because it's defined in `cl-macs.el`, i.e. in the CL library (tho this > file now belongs to the CL-Lib library). >=20 > The renaming was motivated by very practical constraints, so there was > very little opinion involved in which things were renamed and which weren= 't. >=20 > "Very little" is not the same as "no opinion", admittedly. For example, > I did refrain from renaming `setf` and instead re-implemented it outside > of CL-Lib, integrating it into "core ELisp". >=20 > Also, we later re-re-named things like `cl-caadr` to just `caadr` > (i.e. integrating it into "core Elisp"). >=20 > > How do you feel about code like this? > >=20 > > (defun tempo-is-user-element (element) > > "Try all the user-defined element handlers in `tempo-user-elements'." > > ;; Sigh... I need (some list) > > (catch 'found > > (mapc (lambda (handler) > > (let ((result (funcall handler element))) > > (if result (throw 'found result)))) > > tempo-user-elements) > > (throw 'found nil))) > >=20 > > Do you think duplicating SOME this way is better than embracing SOME? >=20 >=20 > Personally, I think it should (require 'cl-lib) and then use `cl-some`. That was the code I wrote. What are you talking about? How does a simple question end up like this, with the OP completely disregarded so you can al= l argue between yourselves! =20 > > In my code I just require cl-lib and add the cl- prefix where needed an= d > > live with that. >=20 >=20 > Same here. >=20 >=20 > Stefan