From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#34481: 27.0.50; cl-flet, cl-labels and lambda expressions Date: Mon, 01 Mar 2021 21:41:18 -0500 Message-ID: References: <87r23br73x.fsf@web.de> <87wod3blkk.fsf@web.de> <87a6rm50qs.fsf@gnus.org> <87pn0izcmn.fsf@web.de> <871rcy1min.fsf@gnus.org> <87czwizb78.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23122"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , Stefan Kangas , 34481@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 02 03:42:18 2021 Return-path: Envelope-to: geb-bug-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 1lGuzI-0005qn-UZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Mar 2021 03:42:17 +0100 Original-Received: from localhost ([::1]:45662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGuzI-0007sv-0t for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Mar 2021 21:42:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51056) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGuz4-0007sj-Jf for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 21:42:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lGuz4-0001Cz-CP for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 21:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lGuz4-0000dJ-A2 for bug-gnu-emacs@gnu.org; Mon, 01 Mar 2021 21:42:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Mar 2021 02:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34481 X-GNU-PR-Package: emacs Original-Received: via spool by 34481-submit@debbugs.gnu.org id=B34481.16146528892392 (code B ref 34481); Tue, 02 Mar 2021 02:42:02 +0000 Original-Received: (at 34481) by debbugs.gnu.org; 2 Mar 2021 02:41:29 +0000 Original-Received: from localhost ([127.0.0.1]:51306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGuyX-0000cW-2a for submit@debbugs.gnu.org; Mon, 01 Mar 2021 21:41:29 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lGuyV-0000cK-Hu for 34481@debbugs.gnu.org; Mon, 01 Mar 2021 21:41:28 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D3ACF10022E; Mon, 1 Mar 2021 21:41:21 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3800E100091; Mon, 1 Mar 2021 21:41:20 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614652880; bh=IiOr2sR5LiFB0FhVu4raGTw9/JcHsprWO8vQvRCo+6U=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=L9akMh2RLFsBJCafp7b9VgR6w81SxrMhkXgUHbbIiigxykzgOVtT0DdgQHhlrp3IO E5lI/aVae+I6ArPX3ue1lXFZYUqGXjpdx7uZoEbZKv+NoEGWlepN22bPJKUQw3GWvp rrqeySFX4utBPdj3XQ85P0IX7Dv3WAp1YXd+IpYIKgxne33O8Azw5hWy4W451em6eO zdLFFwpwxNU/VbpD+j6aIsOOYQVkBn4PrFODzAj2v6QfXtjpWDy+oHUoILbGq+gPDY ul1wOdltNHlXTj0Ie9xOsBlKrCLm6TfAy1LNUiwSAsiaBYA5l2x44zgrh52fXPYtn2 6wf6Fowoop/UQ== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EFA9212026C; Mon, 1 Mar 2021 21:41:19 -0500 (EST) In-Reply-To: <87czwizb78.fsf@web.de> (Michael Heerdegen's message of "Tue, 02 Mar 2021 00:49:31 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201180 Archived-At: >> Just because it's not a part of Common Lisp -- I think people expect >> the cl-* functions to be a subset of CL syntax, not a superset. > For cl-flet, we already have it, and it's a useful extension. For > cl-labels, I don't care that much, and allowing arbitrary > function-valued expressions does not even make sense for it. `letrec` does allow function-valued expressions, so `cl-labels` could just as well. But it's rarely useful, indeed. > But for macrolet I guess it could make sense (does CL have macrolet?). It can be useful, but it can only depend on values that exist at macro-expansion time. In practice, all the use cases I know are for use where `cl-macrolet` would be used in the output of a macro, so it's just as easy (if not easier) to call `macroexpand-all` directly, passing it the environment you want. Hence the difference between `cl-flet` and the other two: I have come up with an actual case where it's useful to have `cl-flet` bind the function name to a "computed function" (IIRC this came up while coding `cl-generic.el`), whereas I haven't come across such a need for `cl-labels` or `cl-macrolet` yet. Stefan