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: What's missing in ELisp that makes people want to use cl-lib? Date: Sun, 29 Oct 2023 08:10:15 +0200 Message-ID: <83v8aqari0.fsf@gnu.org> References: <83ttqnm4ti.fsf@gnu.org> <831qdlpoye.fsf@gnu.org> <83sf5xhnym.fsf@gnu.org> <871qdhk49w.fsf@dataswamp.org> <25914.49745.111873.734458@orion.rgrjr.com> <8334xud0fl.fsf@gnu.org> <6f9dba21-1e90-2cd1-2775-a9bde3d0188f@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6127"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, rms@gnu.org, rogers@rgrjr.com, emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Oct 29 07:11:30 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 1qwz1G-0001Pn-2f for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Oct 2023 07:11:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qwz0W-0003Oh-Lt; Sun, 29 Oct 2023 02:10:44 -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 1qwz0U-0003OV-M9 for emacs-devel@gnu.org; Sun, 29 Oct 2023 02:10:42 -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 1qwz0T-0002uT-Uw; Sun, 29 Oct 2023 02:10:41 -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=oc2XIeZdXOwEXCewiHv1CfNowHAuYSO/7m5yN6W9DlI=; b=YrofvVKxzGmB OThdWajMeFQLFT9aagrI0mICtuG83nMUHUlKG60Hbi/V7Qb6ZOPlV9UbftxrbdubxMZe8NMixar92 dbnKUtmiy4S21T4b+0/vNYDzNIrh44RUaiNGR8lmxMrgCB+NZIsA729B+4jRKK5tSOnlj3HhLlTSA /3iRhZHicpoCXj/SW1QVND+i0JOXNmcIXS0BlLkfHLLpvG/4pa8MacZb/nQgqQ4Ska9xXexUNef46 hQN0j1O2S6Gnu+Nhd51OO5P+7ILQcCzEInLpPfx31nU6NuQalH31ZcvkBmnMCnOswzfIsS6y+pEqW 2K6slYhL05A7KmP6oexThg==; In-Reply-To: <6f9dba21-1e90-2cd1-2775-a9bde3d0188f@gmail.com> (message from Jim Porter on Sat, 28 Oct 2023 14:03:29 -0700) 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:311969 Archived-At: > Date: Sat, 28 Oct 2023 14:03:29 -0700 > Cc: stefankangas@gmail.com, rms@gnu.org, rogers@rgrjr.com, emacs-devel@gnu.org > From: Jim Porter > > Is there any benefit in aliasing macros like this to non 'cl-FOO' names > anyway? I don't have an opinion on this, so I'll let others chime in. In general, introducing aliases has a minor downside: people will need to learn two names instead of just one. > I see that 'cl-progv' is in cl-macs.el, so I guess that's not relevant. > 'cl-mapc' is in cl-extra.el, which I suppose is relevant here? Yes, cl-extra is just another part of cl-lib. > I find it very helpful, but I'd be happy with any function/macro > that would make it easy to iterate over multiple sequences at once. Try looking in seq.el or map.el. > 'cl-remove-if' should be easy to replace with 'seq-filter' or somesuch. > Likewise 'cl-list*' with 'nconc'. I know there's some controversy around > 'cl-loop' (I'm not a big fan myself), and I've thought about adding some > new hooks to Eshell that would probably obviate the need for 'cl-loop' > (which is used in em-extpipe.el). > > So in conclusion, I guess the relevant functions that I care about are > 'cl-mapc', and to a lesser degree 'cl-incf'/'cl-decf'. Everything else > could go away if we wanted to avoid them. Since seq.el is preloaded, I think we should prefer it to cl-lib. Likewise map.el, although that isn't preloaded.