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: Tue, 02 Jan 2024 23:11:27 -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="16517"; 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 Wed Jan 03 05:12:12 2024 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 1rKsbz-00048t-W1 for ged-emacs-devel@m.gmane-mx.org; Wed, 03 Jan 2024 05:12:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKsbM-0003Ku-JA; Tue, 02 Jan 2024 23:11:32 -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 1rKsbJ-0003Hu-7x for emacs-devel@gnu.org; Tue, 02 Jan 2024 23:11:30 -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 1rKsbI-0000no-UC; Tue, 02 Jan 2024 23:11:28 -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=CqsbH65dN4v3rYw5O4U57m55gcTgTA063khPOp+HnMA=; b=Z/AyIqQH2szU Wb5IXJf4p4tqer1jurklHMJYZz0ig8KDllcFc+xnU2FHjlgZyloaF4HbT9+eyZHKR/j38Z5x4HNhu 88d6WhzNLYbTvPmmb75/xHNBHQ8YAGw7VuZTUXc194xdP8sx1X9U7YhZ3ARFR+KFoft8oq0u9XZ9G Q+93wwvwxDZpmYHIQNxfoThU//fvpeoOj+Zmjb0bZFdV67eYU6LkOWmtMu091yV5/adv8QHc5YOpB f/uBlBhvNUgvNPGDXwjM9hXfaTb+YEYXr2Ei5a0ih0+WM6wwCMmGrVbPG+zaBczfewbK4q5hxVnw4 TGevyX5K2WfvAThUb6EGSg==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rKsbH-0002bf-KH; Tue, 02 Jan 2024 23:11:28 -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:314469 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. ]]] Plesae forgive my delay in getting to this. > 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) ... > It isn't an accident that the reference documentation of cl-loop in > cl.info takes a whopping 700(!) lines. This suggests an idea to me: we can define something in the byte compiler to distinguish simple uses of cl-loop from non-simle ones, and warn about the latter. The distinction could be a matter of whether it uses cl-loop features that are less frequently used. Or perhaps how MANY cl-loop features are used. (There is no need to try to make this precise or quibble about the details.) We could enable the warning for source files in the Emacs distribution. -- 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)