From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Lisp files that load cl-lib in problematical ways Date: Fri, 20 Oct 2023 09:49:12 +0300 Message-ID: <83y1fxss9j.fsf@gnu.org> References: <87il8betof.fsf@dataswamp.org> <83fs3dgxv8.fsf@gnu.org> <835y38qvlg.fsf@gnu.org> <87bkcx6eci.fsf@dataswamp.org> <83ttqnm4ti.fsf@gnu.org> <87r0lqoo5x.fsf@dataswamp.org> <83msweu76j.fsf@gnu.org> <87o7gungi1.fsf@dataswamp.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Emanuel Berg Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 20 08:50:24 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 1qtjKx-0004WH-Pg for ged-emacs-devel@m.gmane-mx.org; Fri, 20 Oct 2023 08:50:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtjJx-0000GR-4a; Fri, 20 Oct 2023 02:49:21 -0400 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 1qtjJv-0000Fw-Cb for emacs-devel@gnu.org; Fri, 20 Oct 2023 02:49:19 -0400 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 1qtjJu-0001Lv-DI; Fri, 20 Oct 2023 02:49:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=IdejEJuj8OX/nWzkNrhJiCljD0doJyxenrKk+IvqxCY=; b=gRBqYbu6ZeT8 kyCIdIc8quk3w7pmMnDg/qJS4iGvnr0KcNMgwHFhpgyo8ZAW5rnurRmkc4oZrTdjDbYMyVbeuq30d 3djOAB/8HMm6uqX1B6lhDKUIOP3hLz6nNlh4oa4gUMPMo8ETzrYdj4wpPcLcsHFX0xS6Q+v+YRzEe iXOt3izlSHc8nO3x+NYYRhA2yBHfp8VEp8/YRK3Nd36IegAY031Mw3l0XWuc1WZa4gKaDmkcTXni7 WW+A6XpGnUmFGYViJfDCHvv2QM7NpnCULIYQxVb5kiiMqKs6d3n9mKbF5ZUFPcw6tp4RWuH9hcG4j sUxnmQY0Vu7PhiDfZb3dew==; In-Reply-To: <87o7gungi1.fsf@dataswamp.org> (message from Emanuel Berg on Fri, 20 Oct 2023 05:02:14 +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:311614 Archived-At: > From: Emanuel Berg > Date: Fri, 20 Oct 2023 05:02:14 +0200 > > Eli Zaretskii wrote: > > >> So what does it matter if it is "purged" from one or > >> several of these levels? What gain is there if that > >> is achieved? > > > > It matters to us because we decided long ago to avoid > > loading cl-lib at runtime in vanilla Emacs. > > But as we have seen in practice it _is_ loaded, be it by the > debugger, by native compilation, or any other package or piece > of Elisp that uses it, or uses something else that is using > it. It is all interconnected, and because it is used so much > already, using Emacs in practice implies having cl-lib loaded > at run time. It is okay for cl-lib to be loaded when packages that use it are loaded. The same happens with gazillion other packages in Emacs; for example, try loading Gnus or Org or Eshell, and see how much stuff unrelated to these packages per se gets loaded as result, because those packages need some non-default infrastructure. What matters to us is that this unnecessary stuff is not loaded in "emacs -Q", i.e. is not dumped and preloaded into the bare uncustomized Emacs session. This lets users start from the leanest possible Emacs, then load what they need, without being "punished" by loads of stuff they never need or want. For Emacs to preload unnecessary stuff is unclean, and we try to avoid that uncleanliness. > > There are several good reasons: bloat, unnecessary namespace > > pollution, etc. > > People use it because it is useful: there is `cl-loop', > `cl-incf', `cl-decf', `cl-pushnew' and many others examples of > that. Those are not complicated to use, they are all prefixed > with cl- (as we see) and have good docstrings. This is not relevant to the issue at hand. > > But all this is not really relevant for the code that you > > (or any one of us) write for their own personal use, it is > > only relevant to code contributed to Emacs. > > But we don't know what people who are starting to write Elisp > today for their personal use go on to contribute to Emacs > packages that make it to the ELPAs, or core Emacs for that > matter. That's okay, they will learn it on-the-fly, from review comments to their contributions, like with the rest of our coding conventions, which are usually not clear to new contributors when they first contribute. > You, and everyone else writing Elisp for that matter, are of > coures equally permitted not to use it, if they consider it > harmful, it just shouldn't be labeled detrimental as a policy > with really no good arguments supporting that claim that we > have seen thus far at least. See above: this is not relevant to the issue at hand.