From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: [SUSPECTED SPAM] Re: `thunk-let'? Date: Mon, 09 Oct 2017 11:38:47 -0400 Message-ID: References: <87infp9z6j.fsf@web.de> <87zi90eehg.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1507563593 3228 195.159.176.226 (9 Oct 2017 15:39:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Oct 2017 15:39:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Nicolas Petton , Emacs Development To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 09 17:39:46 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e1a9h-00089u-Bj for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 17:39:45 +0200 Original-Received: from localhost ([::1]:58418 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1a9n-0007lb-3V for ged-emacs-devel@m.gmane.org; Mon, 09 Oct 2017 11:39:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1a8r-0007ke-Uq for emacs-devel@gnu.org; Mon, 09 Oct 2017 11:38:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1a8o-0006Eh-1e for emacs-devel@gnu.org; Mon, 09 Oct 2017 11:38:53 -0400 Original-Received: from pmta11.teksavvy.com ([76.10.157.34]:57449) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1e1a8n-0006Dg-RB for emacs-devel@gnu.org; Mon, 09 Oct 2017 11:38:49 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2Gt0gAYl9tZ/5+ESC1dHAEBBAEBCgEBg?= =?us-ascii?q?zAtgVKJLoR5G49wgXZ5lTeCEQqFOwKEN0oNAQIBAQEBAQEBA2gohRkBBAF5EAs?= =?us-ascii?q?NJxIUGDGKOwiqNiICinwBAQgCJoMtggKDO4J0NYp4BZFAj3WgMyiHF5VagTlNC?= =?us-ascii?q?4EOMiEIMogCJIogAQEB?= X-IPAS-Result: =?us-ascii?q?A2Gt0gAYl9tZ/5+ESC1dHAEBBAEBCgEBgzAtgVKJLoR5G49?= =?us-ascii?q?wgXZ5lTeCEQqFOwKEN0oNAQIBAQEBAQEBA2gohRkBBAF5EAsNJxIUGDGKOwiqN?= =?us-ascii?q?iICinwBAQgCJoMtggKDO4J0NYp4BZFAj3WgMyiHF5VagTlNC4EOMiEIMogCJIo?= =?us-ascii?q?gAQEB?= X-IronPort-AV: E=Sophos;i="5.42,500,1500955200"; d="scan'208";a="6082045" Original-Received: from unknown (HELO ceviche.home) ([45.72.132.159]) by smtp.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2017 11:38:47 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 7DB5C66268; Mon, 9 Oct 2017 11:38:47 -0400 (EDT) In-Reply-To: <87zi90eehg.fsf@web.de> (Michael Heerdegen's message of "Mon, 09 Oct 2017 13:40:27 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 76.10.157.34 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:219305 Archived-At: >> Another name could be `lazy-let`. But if you add it to thunk.el, then >> thunk-let sounds like the better name. > Ok, so let's be brave and aim to add it as `lazy-let' to subr-x. > There is a question I want us to think about: what should the semantics > of a `lazy-let' bound variable be if it is bound or set inside the BODY? The semantics of `setq`ing such a var should be: compile-time error. The semantics of let-rebinding such a variable should be for the new binding to hide the outer (lazy) one. cl-symbol-macrolet currently doesn't provide this let-rebinding semantics, but it should (we already need to fix it for generator.el), so it's perfectly fine for the new code to just use cl-symbol-macrolet and then say that if rebinding isn't working right it's due to a (known) bug in cl-symbol-macrolet. Stefan