From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67116: byte-compile-let: reversing the order of evaluation of the clauses CAN make a difference. Date: Sun, 12 Nov 2023 11:49:55 -0500 Message-ID: References: <83r0kvv6r0.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21497"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 67116@debbugs.gnu.org, acm@muc.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 12 17:50:36 2023 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 1r2DfQ-0005OY-K9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Nov 2023 17:50:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2DfD-000466-2G; Sun, 12 Nov 2023 11:50:23 -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 1r2DfC-00045x-1S for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 11:50:22 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2DfB-00015S-M8 for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 11:50:21 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r2Dfp-00038z-Vh for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 11:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Nov 2023 16:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67116 X-GNU-PR-Package: emacs Original-Received: via spool by 67116-submit@debbugs.gnu.org id=B67116.169980785012065 (code B ref 67116); Sun, 12 Nov 2023 16:51:01 +0000 Original-Received: (at 67116) by debbugs.gnu.org; 12 Nov 2023 16:50:50 +0000 Original-Received: from localhost ([127.0.0.1]:56852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2Dfd-00038X-GP for submit@debbugs.gnu.org; Sun, 12 Nov 2023 11:50:50 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2DfY-00038A-06 for 67116@debbugs.gnu.org; Sun, 12 Nov 2023 11:50:47 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 38F47440F32; Sun, 12 Nov 2023 11:49:57 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1699807796; bh=Bl5JKfSAz3l7bW25Y8/Ly/0xhbd7fy1uOW1wyiqqfcs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LybXKc2ic0K203lbCK3oXJXzM2MWLRuJ17Okhz/Gw4LM8ulmQEoDJJpR9ZIk/NAw4 ba+gDqxQbgG9HUzSoEZqZhA41Og3L9vsUw99vcUgoP07t9rDuakN9VxyoMOzVLIGLD 0GXc20uAliBE88Op0u/SZXEM6894wPPlgkkAZBHJzNbKgWZU9PTUqc5bJwCXzTVj+5 N8lt7mnEtuAy2eJ4gudfgydU/nMci3s8xaOejsBIw8SSTqeEHIirNppQi/P0U36VVS zoA32ckDXUXEeR3pHWEPocDRJ9RxYvXkNY7bmMrOMEc+hXHWaiNm581mQAB6SxdUix uN6T3lS9QO/AQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3859C440876; Sun, 12 Nov 2023 11:49:56 -0500 (EST) Original-Received: from pastel (unknown [45.72.227.120]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 11E1712034F; Sun, 12 Nov 2023 11:49:56 -0500 (EST) In-Reply-To: <83r0kvv6r0.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 12 Nov 2023 08:13:39 +0200") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274212 Archived-At: >> Sounds like a bug. > It does? I always thought that the order of evaluation in a let form > is unspecified, I'm not sure if we say so explicitly somewhere, but ELisp's order of evaluation is very much always "left to right" and that carries over to `let`. > Why on Earth should we require any particular order of evaluation in > a let form?? That's a popular bikeshedding subject, actually. On one side you have the proponents of leaving the order unspecified (like in C and Scheme) on the premise that it allows more choice for the compiler, on the other you have the proponents of specifying the order so as to remove an ugly corner case that bites programmers. I am personally not swayed by the optimization argument (tho the OCaml bytecode compiler had a good argument in favor of right-to-left evaluation order) and in the case of ELisp, there's a lot of code out there which already relies on the current evaluation order. Stefan