From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Mon, 13 Nov 2023 21:58:55 -0500 Message-ID: References: <871qd8sfdx.fsf@posteo.net> <838r7g8pys.fsf@gnu.org> <87bkcbrgnr.fsf@posteo.net> <25924.21015.19614.951576@orion.rgrjr.com> <87bkc4jpja.fsf@dataswamp.org> <12da6bcb-1818-7fbe-12af-8d4607724332@gutov.dev> <87il6bt4z0.fsf@yahoo.com> <8734xetjkk.fsf@yahoo.com> <87cywhsrcf.fsf@yahoo.com> <87cywgx1z0.fsf@web.de> <83wmuowwp3.fsf@gnu.org> <83leb3v5al.fsf@gnu.org> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26788"; mail-complaints-to="usenet@ciao.gmane.io" Cc: joaotavora@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 14 03:59:14 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 1r2jdy-0006kG-EX for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Nov 2023 03:59:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2jdn-00075U-Rx; Mon, 13 Nov 2023 21:59:04 -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 1r2jdj-0006xE-5t for emacs-devel@gnu.org; Mon, 13 Nov 2023 21:58:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2jdh-0008Ea-I6; Mon, 13 Nov 2023 21:58:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=qb58vLeuavH4ke8WhdRgr7ojDbr0I5vXqJ/YNngyOx8=; b=YZhT6WCh8h9v Q1gMGRfoRe8gP3qXkzCoVbh3XFzz6AjXin+W8FHqWAdB5Lm/XrwQommrW+POgWbL45KeBOzDK/JBP TmNHSMzpnxQtzaIWJV87YyjN1qCN3zuovnrgDiq9wi9mx2tPTKXBQHb4T05eAPPLeOosjUifQ2LcB kDCbkKY4jSwF/ALGdth2vTGX31WBGAWGfYAO8l0P/KvCL3GgEAQ5ONKqfon21HTGQF9+pouiODFUl 2RfGTKciznjw59llASuvCMU5/TrlBs+jqshoHE8l6aGB2FGMAgkr+cDD7m/DG6C2iLZywTuKF5ORF iM9H/edla35MU1eIlirqEg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1r2jdf-0001LD-TS; Mon, 13 Nov 2023 21:58:55 -0500 In-Reply-To: <83leb3v5al.fsf@gnu.org> (message from Eli Zaretskii on Sun, 12 Nov 2023 08:45:06 +0200) 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:312713 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Btw, the above is a very simple use of cl-loop. We have quite a few > of much more complex ones. For example: > (cl-loop > with comp-ctxt = (make-comp-cstr-ctxt) > with h = (make-hash-table :test #'eq) > for (f type-spec) in comp-known-type-specifiers > for cstr = (comp-type-spec-to-cstr type-spec) > do (puthash f cstr h) > finally return h) Boy that is hard to understand. I suggest we rewrite those cl-loop calls into ordinary Lisp, avoiding use of cl-loop. I looked at the manual for the iter construct ("iterate"). The added parentheses make it fit better into Lisp. However, I have to ask how the complexity of the usage of iter. Does iter offer a corresponding construct for each cl-loop construct? Are the iter constructs in 1-1 correspondence with cl-loop constructs? If so, replacing c-loop with iter might not reduce the complexity that either one adds to Emacs Lisp. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)