From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: Advantage using mapc over dolist Date: Tue, 3 Dec 2024 23:05:16 +0300 Message-ID: References: <87zflevbwm.fsf@neko.mail-host-address-is-not-set> <87h67ku813.fsf@neko.mail-host-address-is-not-set> <7xlzeonoWSUauTrSplAmgZhQ82RWabA8HApJ7znvbfmBbIzxB_yA78vOqoht_Qs_VAABcnxMe4qCfV8X2yVAgovxFOcNLKrhGEIhvQsbol4=@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1159"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.12 (2023-09-09) Cc: Stefan Monnier , Tomas Hlavaty , help-gnu-emacs@gnu.org To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 03 21:05:39 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1tIZ9O-000AeT-Qr for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 21:05:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIZ9G-0004f6-Oh; Tue, 03 Dec 2024 15:05:30 -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 1tIZ9F-0004eL-1O for help-gnu-emacs@gnu.org; Tue, 03 Dec 2024 15:05:29 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIZ9D-0002ZD-5u for help-gnu-emacs@gnu.org; Tue, 03 Dec 2024 15:05:28 -0500 Original-Received: from localhost ([::ffff:41.75.174.232]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000081F0A.00000000674F6483.00359930; Tue, 03 Dec 2024 13:05:23 -0700 Mail-Followup-To: Heime , Stefan Monnier , Tomas Hlavaty , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <7xlzeonoWSUauTrSplAmgZhQ82RWabA8HApJ7znvbfmBbIzxB_yA78vOqoht_Qs_VAABcnxMe4qCfV8X2yVAgovxFOcNLKrhGEIhvQsbol4=@protonmail.com> Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148562 Archived-At: * Heime via Users list for the GNU Emacs text editor [2024-12-03 21:03]: > > This was not done to discourage people's use of it, actually the > > reverse. Yes, I know it sounds counter intuitive > > Your statement that it is counter intuitive does actually result in difficulties > to users. Instead, things should be clear, so users can easily decide when to > use one form and when the other, or if there is no difference alone. Statement alone doesn't create any difficulties unless in pcase that user is reading-impaired or doesn't know English words. Emacs Lisp is so large and with so many packages, so those users who are on the level of decision making IMHO should have no problem deciding pcase by pcase basis when to use one form or the other. I understand that many things, such as using the Emacs Help system, may be unclear to you. Naturally, we need to help each other to make things clearer. However, as long as you are still struggling with Emacs Help, how can I take your opinion on 'users should easily decide when to use one form and when the other' seriously? They already can and do so. Some users will know how to use which form or the other, and some users will not know, and some will not care less, like me. > > , so let me explain: > > Richard was strongly opposed to the use of the CL package because of its > > "stepping" all over the ELisp namespace. For years, this manifested > > itself in the fact that use of CL within Emacs's own code was generally > > shunned and tolerated only with (eval-when-compile (require 'cl)), > > meaning that you could use CL only when it could be compiled away during > > byte-compilation (by macro-expansion and/or inlining). So you could use > > `ecase` but not `some`. > > This discouragement seems to have remained present. Users looking at the cl-* > also wonder in what situations would they use them and when to use the elisp > ones. One cannot find a clear discussion about this in the manual, in a way > that a user can make the suitable decision about which to use. I get that astonishment of you, but cl- prefix is basically self-explanatory in Common Lisp documentation. It is made to be compatible with the Common Lisp, so there is much about it somewhere else. > > While some people were happy because they consider that ELisp is better > > off without those Common Lisp constructs, many others were annoyed, and > > it imposed obstacles to the inclusion of some packages into Emacs. > > > > Finally in Emacs-24.3, we reached a compromise which was to introduce > > CL-Lib, which is like CL except all the functions/macros are prefixed > > with "cl-". By its nature as a compromise, everyone both lost and won > > at the same time. Just to say something, neither I lost anything, nor I won anything. Just in pcase there is still something to win, let me know? > The question is whether people can use the cl-* ones freely or not. Are > there scenarios when you don't want to use them but use the elisp ones instead? I know I can freely use cl-* one, so I just give my vote to make it well known. There are scenarios where I don't want to use it, that is basically in all scenarios within Emacs Lisp. And when I program in Common Lisp, I do use it, I have bunch of it, and use it every day, software I made for business over here, simply works for years, so long that I even forgot how I did it. > One thing I still have difficulty about is how the usual lisp is > discouraged when elisp is supposedly normal lisp for use with emacs > configuration. But has evolved into something else. Common Lisp is not usual Lisp. Though by literal meaning sounds kind of similar. https://en.wikipedia.org/wiki/Common_Lisp I am more and more using Emacs for business lead generation, it hangs on the web server, and subscribes people, and handles double opt-in subscriptions, it is all so much simpler for me to customize Emacs file as user `www-data' and collect those opportunities. I am also using Common Lisp for that, but I dislike complexities. It will be all switched to simple Elisp. Common Lisp is not Elisp, but there is no pcase against Common Lisp in Emacs, it is welcome. There are some CL functions that help users of Common Lisp to use them within Emacs, those are cl- functions. So who is used to it, can use it. It is though rarely used with Emacs configuration IMHO. There is no discouragement, just that functions have different prefix. Look this: (defalias 'case 'cl-case) case is an alias for ‘cl-case’. (case EXPR (KEYLIST BODY...)...) So just alias the function how you wish in your own package and just keep working without prefix if you wish. -- Jean Louis