From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Why is FUNC in cl-callf not allowed to be an expression? Date: Tue, 21 May 2019 13:38:52 -0400 Message-ID: References: <874l631ek1.fsf@web.de> <87pnoqtuhm.fsf@web.de> <87r2961gox.fsf@web.de> <87mujohasa.fsf@web.de> <87a7fn3c6c.fsf@web.de> <875zqabh3t.fsf@web.de> <87zhnma11c.fsf@web.de> <871s0y3weo.fsf@web.de> <87tvdshew9.fsf@web.de> <87k1ek673s.fsf@web.de> <87d0kc5xs5.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="152579"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 21 19:39:16 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hT8jL-000dZ0-PP for ged-emacs-devel@m.gmane.org; Tue, 21 May 2019 19:39:16 +0200 Original-Received: from localhost ([127.0.0.1]:57340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT8jK-0003Fj-Pv for ged-emacs-devel@m.gmane.org; Tue, 21 May 2019 13:39:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT8jE-0003FR-Lf for emacs-devel@gnu.org; Tue, 21 May 2019 13:39:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hT8jC-0005Z6-UP for emacs-devel@gnu.org; Tue, 21 May 2019 13:39:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45757) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hT8jA-0005VM-W1 for emacs-devel@gnu.org; Tue, 21 May 2019 13:39:06 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AAA6310099F; Tue, 21 May 2019 13:39:00 -0400 (EDT) Original-Received: from mail02.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 72DCE100870; Tue, 21 May 2019 13:38:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1558460339; bh=Cu7bkI7BRMhjrxsyOw9wZcUSG/T91fNnOMBbZqeV7vk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=B3TJH4poGdRRIcjG2QWfW23nMYNiX+w2VFTcQ9N5/b6IMVQvBEfdhOaPWBX1/c26g 9bgDFL/MFHZiVeo0yFol/Sq4h7MmHhTIdsytfyAEl4+gMNgtP9BqHSI4rn3zfVv3bn wKCtoAZ7z6EgGIcRgKgO63hYmxVE4Zq1bZTrbifEVt+t/uLgm/ALg8y8CtVnjf5LOT sgttwXX19tigdinRw+qN4i9u6m5bzGcKjdFzEiNMf3ddEPjJ445vkYBnp/vOUhlDxE Vc9eMcynGq8MKXa+c+vttXU9naipB3eH/ArvRnG+96Z32+it5JBGT2ILHzG//mOZWq D1ZZrP4HgxBtQ== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail02.iro.umontreal.ca (Postfix) with ESMTPSA id 6AE97120B48; Tue, 21 May 2019 13:38:59 -0400 (EDT) In-Reply-To: <87d0kc5xs5.fsf@web.de> (Michael Heerdegen's message of "Tue, 21 May 2019 04:47:22 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236862 Archived-At: > Yeah, I know. But cl-callf already exists, and the first argument is > interpreted as a function, so would it hurt to remove the restriction to > fbound symbols? FWIW, I don't care what happens to cl-callf ;-) I just assume that (cl-callf (lambda (x) (funcall (if flag #'1+ #'1-) x)) my-number) should compile to the same bytecode as (cl-callf (with (if flag #'1+ #'1-)) my-number) I think the discussion whether the first arg can be an expression or not is just an indication of a design problem in `cl-callf`. IOW, I'm more interested in providing a better replacement than in trying to extend it. > Would you want to see both gv-modify and gv-place-bind (or however we > call it) added? I tend to be more a fan of gv-place-bind. I don't really have a clear opinion formed on this. Stefan