From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: seq.el and the complexity of Emacs Lisp. Date: Mon, 06 Nov 2023 06:51:42 +0000 Message-ID: <87h6lz74sh.fsf@posteo.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19631"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gerd =?utf-8?B?TcODwrZsbG1hbm4=?= , paaguti@gmail.com, emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Nov 06 07:53:00 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 1qztTo-0004v5-KA for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Nov 2023 07:53:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qztSm-0003O9-9p; Mon, 06 Nov 2023 01:51:56 -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 1qztSi-0003Nw-Gv for emacs-devel@gnu.org; Mon, 06 Nov 2023 01:51:52 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qztSf-0000L9-3K for emacs-devel@gnu.org; Mon, 06 Nov 2023 01:51:51 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B5C60240028 for ; Mon, 6 Nov 2023 07:51:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1699253503; bh=Uiw3mpig9+tqGBgYXRGV1SW2J0Kav+FypP7cFHHImE4=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=W47sNikQQ4x+sibX66ZuRY/KwX1EyiIkfSi2z5ldO5ep1k5gVBthLyiDkLhKpU3Mb ADK9kJEzxMwHG+ZfduDgJqkOWRLSWWJMB0sunJNZ6lRxUorROh5pI51s7JrlqGSAWz xkxplI7VCdsV7Ncl7+AfjipexS7pY28ZpVTMYJJpTj+pS9Y8lBObXKqeNFZJYel8sY LkOqF7DdtmSLvTUbsrQyF6FfqRCd4Fgqam3A/xv12IuR3Dc4sPSug1QQuUWxWM/QSq 2ZmGtrS+n7RuXdAb50I1qmkZ8D1H5Vv51PnqZQsmvrZrup3Nbp5BddppRbRZVmstQT gY+iyobb4IqKg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SP27z0hwxz6tm4; Mon, 6 Nov 2023 07:51:43 +0100 (CET) In-Reply-To: (Richard Stallman's message of "Sun, 05 Nov 2023 21:27:25 -0500") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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:312265 Archived-At: Richard Stallman writes: > [[[ 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 looked at seq.el to try to get an idea what those functions do. It > was difficult to get this from the doc strings, because it wasn't > explicitly stated which ones are for users and which ones are > internal. Eventually I got somewhat of an idea. > [...] > I expect that they are slower at run-time, because each seq- function > needs to do the generic dispatch for each call. Is that correct? Yes, I believe this has been empirically verified on multiple occasions. [...] > Could we replace all the cl-lib sequence function calls with seq- > calls, in core and GNU ELPA code? Seq is simpler and cleaner, so that > would be an improvement. We could keep cl-lib permanently for > compatibility for external code, but it would not need to be loaded > (into Emacs or your brain) very often. Cl-lib would still be used, because it provides more than just functions to operate on sequences. There are a number of macros (cl-flet, cl-loop, cl-incf, ...) and functions (cl-map accepting multiple lists, cl-subst) that are frequently used and to my recollection to not yet have analogous replacements in seq.