From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Lisp files that load cl-lib in problematical ways Date: Thu, 26 Oct 2023 10:34:13 +0000 Message-ID: References: <83ttqnm4ti.fsf@gnu.org> <831qdlpoye.fsf@gnu.org> <83sf5xhnym.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15828"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, stefankangas@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 26 12:34:38 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 1qvxhG-0003ud-A8 for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Oct 2023 12:34:38 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvxgx-0003cb-T1; Thu, 26 Oct 2023 06:34:20 -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 1qvxgw-0003cT-UA for emacs-devel@gnu.org; Thu, 26 Oct 2023 06:34:18 -0400 Original-Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvxgu-0004JR-DT for emacs-devel@gnu.org; Thu, 26 Oct 2023 06:34:18 -0400 Original-Received: (qmail 91941 invoked by uid 3782); 26 Oct 2023 12:34:14 +0200 Original-Received: from acm.muc.de (p4fe15ac5.dip0.t-ipconnect.de [79.225.90.197]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 26 Oct 2023 12:34:13 +0200 Original-Received: (qmail 4133 invoked by uid 1000); 26 Oct 2023 10:34:13 -0000 Content-Disposition: inline In-Reply-To: <83sf5xhnym.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:311901 Archived-At: Hello, Eli. On Thu, Oct 26, 2023 at 09:55:45 +0300, Eli Zaretskii wrote: > > From: Richard Stallman > > Cc: eliz@gnu.org, acm@muc.de, emacs-devel@gnu.org > > Date: Wed, 25 Oct 2023 22:27:54 -0400 > > > The only difference I see is that new version is harder to read, and > > > more prone to bugs (as you have to write the same code twice). > > Do you frequently use the cl- facilities such as `cl-pushnew'? If so, > > that might explain why you didn't _see_ the extra complexity that > > comes from calling `cl-pushnew'. That extra complexity exists for > > people who don't habitually use cl facilities, and not for those who > > do habitually use them. > I think the need to be familiar with the cl-lib and cl-macs > functionalities is nowadays a requirement for any Emacs maintainer. For me, that is not possible. I simply don't have the brain power to memorize such a morass of arbitrary, poorly named, poorly documented stuff. I am forever cursed by having to look up doc strings each time I encounter these objects. Maybe not things like cl-incf, but monstrosities such as cl-labels just leave me groaning. I frequently spend, perhaps, half of my debugging time trying to understand what some cl-* does rather than concentrating on the problem to be debugged. > It can take time to familiarize oneself with them, but it isn't rocket > science. How many contributors are actually familiar with the bulk of cl-lib? I suspect, very few indeed. Maybe Stefan M. The people who have written strongly in favour of cl-lib over the last week or two have not been those who spend lots of time maintaining others' code. I further suspect that many contributions using cl-lib are from people who know a small part of cl-lib, find the functionality intriguing, and thus use it. The trouble is, each such contributor knows a different part of it, so in aggregate the part that an Emacs maintainer needs to know (or continually to look up) is large. Note that Common Lisp never took off as a popular language. There must be reasons for this. > Btw, some of the cl-lib facilities should not be used in new code if > they have equivalent implementations ins seq.el (which is nowadays > preloaded) and in map.el. cl-generic.el is also preloaded, so should > be used in preference to the cl-lib alternatives. And some frequently > needed cl-lib functions were moved to cl-preloaded.el, and are also > always available. -- Alan Mackenzie (Nuremberg, Germany).