From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: Re: Some improvements for cl-flet Date: Mon, 13 Sep 2021 02:14:20 +0200 Message-ID: <87y281cowz.fsf@web.de> References: <87bl4zqnqn.fsf@gmail.com> <87czpe4rj2.fsf@web.de> <874kaqqxe7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19805"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: akater Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 13 02:15:27 2021 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 1mPZd9-00050j-Bw for ged-emacs-devel@m.gmane-mx.org; Mon, 13 Sep 2021 02:15:27 +0200 Original-Received: from localhost ([::1]:60992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPZd6-0004L6-TX for ged-emacs-devel@m.gmane-mx.org; Sun, 12 Sep 2021 20:15:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPZcB-0003eO-4v for emacs-devel@gnu.org; Sun, 12 Sep 2021 20:14:27 -0400 Original-Received: from mout.web.de ([212.227.15.3]:47411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPZc9-0004h6-HI for emacs-devel@gnu.org; Sun, 12 Sep 2021 20:14:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1631492061; bh=gd07BMDAlq7VuZ7MNowwqoc6pp2PZtbRSOOj6rsFeG8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=g2qEdSXIeGxYVzt2yXaE5TjqWBuP/DArsX8+McMndQ4scRQQQycLaRkpUJAb4s4TN UBc1mjycoeGUMeX3dmoqiL0r5lwTKJYcjMUAIn4HjkfQSprlsTlNl3HaTWKaJsUWXb LnM//0R/24w9XefYm+hn2eUKGFj/M20GIJHTr9sg= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([217.247.77.50]) by smtp.web.de (mrweb001 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LtoGb-1n6hmi1mXl-011CYZ; Mon, 13 Sep 2021 02:14:21 +0200 In-Reply-To: <874kaqqxe7.fsf@gmail.com> (akater's message of "Sun, 12 Sep 2021 03:35:12 +0000") X-Provags-ID: V03:K1:fUNoku+ZfypwNynqBSh8zAYdfooF/SGPUXBspgK1Hz6hDxBph8D 0thXAiEweBFO1GAvI1oR8ocCOK/TTYQIQPOD2nBAkEkTb8zKChqbNr0zc4wjxu9Yy5/Ojh8 G85SL6y4ja0QYSKfhL55BGQr3gYY7ZRL85amkdfDa+6Ec787tv4uKY7+1bKjna2+PvR+qyv 1zblJz55muztbZTpYsiOQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:N1umBPktjBg=:LOP8uIhIWDr3PcSpYZn9jT cOpJjtNcY4c6aPmBIUIbWa/by23bhtJLDNn5RFATE7ycqLrYgJ4JTl6+Wbv820bYtclq3yB5f YJmVzVRH2UyQYt7Xy4pdCOCkrus1OdTKxyu3ATCs0BYSiBtwBD5zPxZKmcJeGB1X43NO0AjOm h5h5geyBI3mxwFKNwwIviL/W1jQPP8yNP5vNY8NVoPwl5Ex3n+0q4vIxfa6JhTY37kQJSzi9C GoFahNcJMnq6YgXmF2UfwkBDUQt9m8xbkpUeSGl4/zUd27tg2wTUR53wyxx4fYB47kbffG5uQ o18VerdjrxMyEFzmMm9mgyBIIZqk3SnpIISI+Jxn8jKr4ev2/W/lrGPhRiBonCVw7Y//fYpTi kIK6Y6K9egow1Ua7WSR10oa6DrPi27LziZXuDBGUyeWjAilHaIfYm6EHQEF/RBrFCFtJLtkas n8EJNaIdPwjRoPRIVDqxnDxJLOCeEzz19YSGa9ciQWdDvlxRhB5mhn5LgEPreo1TZtrxNUZTC vvaWosrFYtlCx8K7XXj70q+OUw9Idxfw0NE10pae63+xPZwjVxRph+7sJZf9JQYWIudhoJ2AL c2rTCJlNv0yfykQ8MU+IJxXvQAeVCELp6ZyFABJWReUqA9A3Lpu2xTUstZdJOfnEifgL+VwGy FXB7kXg04oeNWaseKNCI2ivdPBWq90NMovoFFgGXbG7STq1qlp5qBlVG4PYtaB5mXv5ikffYA w4ED5TMVimLQykH2SsbHiVoQrf5F6IJKilmTkzdhKF4XY7+X4zBwKPT74tJcuVoYbKY3pqcf Received-SPF: pass client-ip=212.227.15.3; envelope-from=michael_heerdegen@web.de; helo=mout.web.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=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.23 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" Xref: news.gmane.io gmane.emacs.devel:274612 Archived-At: akater writes: > > I see that a binding like (f (x y z)) is ambiguous. But isn't that a > > minor problem? > > No. Syntax ambiguity is always a huge inconvenience. I see your point. OTOH, removing the expression syntax case would be a backward incompatible change potentially break existing code - right? > Even if I fail at convincing anyone that it should be dropped, I do > wonder if this was indeed a Scheme influence. A code example (to illustrate what cases we talk about) could look like: #+begin_src emacs-lisp (cl-flet ((multilinep (apply-partially #'string-match-p "\n"))) (pcase something ((and (pred stringp) (pred multilinep)) ...) ...)) #+end_src It's useful to be able to bind the result of some expression to a symbol's function binding. AFAIR I was one of those who wanted `cl-flet' to support this, and I had not been inspired by Scheme much. Personally I wouldn't mind when this functionality would be provided by some other form, but there is backward compatibility. And don't you think that cl-lib (see Stefan's answer) differs from CL much more in other aspects? You can find discussions about to which degree cl-lib should be kept an as strict as possible emulation of Common Lisp in the emacs dev and/or bug mailing lists. There were different opinions. Undoubtedly the main purpose of cl-lib today is just for writing Emacs Lisp code, however. Michael.