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, 20 Nov 2023 21:43:59 -0500 Message-ID: References: <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> <87a5rgrbvv.fsf@neko.mail-host-address-is-not-set> 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="13497"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Tomas Hlavaty Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 21 03:44:26 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 1r5GkT-0003Kb-PJ for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Nov 2023 03:44:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r5Gk5-0007di-2X; Mon, 20 Nov 2023 21:44:01 -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 1r5Gk3-0007dT-UE for emacs-devel@gnu.org; Mon, 20 Nov 2023 21:43: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 1r5Gk3-00078F-LR; Mon, 20 Nov 2023 21:43:59 -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=Y8KOu6hY8D5kG62OkZ5EVhadPLG2ckQTDLPlpva5vKo=; b=isLfX/+71BUX H8u5L1BW+99CyTPcFJZe7GjIBQBwmYc7OWLtZWmBdsveFYEMywAxFxbufUnT/FTuTf1BmaGMDxQEU c6ylL3lJUA+DTPlleW1y+Gg7C4aNrZj8q++NXBYpNcetwPt+f9TDDrsPLbJxFs3er16TqjzUrbBr7 Al+Zh309h0orstw+VXBASYXUJyxIEj3DLFwDmrf2zwjIzU+Qe95T0lHf5IPBDMFw7OkLFoWjd+D1B /JebFLHhYGhhKX8orq897RCVSepbFn5y9PZhDZbfFos/51h9BiAvi1hWMOCrMljHOTOH4jJzhgb5Q hLJkWLHXAhchJPwdsMAjgw==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1r5Gk3-0008HC-DU; Mon, 20 Nov 2023 21:43:59 -0500 In-Reply-To: <87a5rgrbvv.fsf@neko.mail-host-address-is-not-set> (message from Tomas Hlavaty on Tue, 14 Nov 2023 09:13:08 +0100) 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:313084 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. ]]] > > I suggest we rewrite those cl-loop calls > > into ordinary Lisp, avoiding use of cl-loop. > That would be something along the lines of: > (let ((comp-ctxt (make-comp-cstr-ctxt)) > (h (make-hash-table :test #'eq)) > f) > (while (setq f (pop comp-known-type-specifiers)) > (puthash f (comp-type-spec-to-cstr type-spec) h)) > h) That is simpler than the cl-loop construct that you rewrote. Though it will alter the ambient valu eof comp-type-spec-to-cstr, which might be undesirable. To avoid that, we could use (dolist (f comp-known-type-specifiers) (puthash f (comp-type-spec-to-cstr type-spec) h)) and avoid binding f in the let. That would be one line less. -- 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)