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.devel Subject: Re: [PATCH] * src/eval.c: Stop checking for nvars, and use only CONSP Date: Tue, 02 Mar 2021 09:31:00 -0500 Message-ID: References: <20210302.111043.609653289571449353.conao3@gmail.com> <20210302.120929.1656994339284323372.conao3@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="4009"; 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: Naoya Yamashita Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 02 15:32:35 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 1lH64f-0000vf-EC for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 15:32:33 +0100 Original-Received: from localhost ([::1]:43974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lH64e-0004Bc-Eu for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Mar 2021 09:32:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH63M-0002rR-Ef for emacs-devel@gnu.org; Tue, 02 Mar 2021 09:31:12 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49764) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lH63I-0001LO-8m for emacs-devel@gnu.org; Tue, 02 Mar 2021 09:31:11 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 23FFA100040; Tue, 2 Mar 2021 09:31:07 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 92B8F100062; Tue, 2 Mar 2021 09:31:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614695461; bh=NdDRJObhYiCbrcc+F2fHfClINtlL46+k9rV2Pekj54c=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=FGJtaW+aDwMe/rHhUdir2TvnHyKeYWkKfk0TUOhhfxQ2yTn9Eh7gBxXxCxEFkz4EP PcM2BR8j2o9+r3s6jGtLr0Ui/E1OIB/mdMVFHHx7zmFBIBAUVrm4VIHMOxWh/yQhRQ LRc1D7GEqWrp6Wrp8VnG/FEDM/bwLsmamThbwi2mEwRTTWKCqhkvERHvjBPXSEf8Cq ghd4jbRQgK6VHI2+Wm3gnvu7ImmpQLO26QC3m5VwvT/obfbJCXWr8k3MsgjdgCXg5z mBjWrY7PzQ4S3xx2HBfxWOfoNF6u/76dfNoiDovg3i2V9AdOTNDKfAgSrKoEwDgMHX 54tUMow85r2wA== Original-Received: from alfajor (unknown [216.154.41.47]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6D0FB12033B; Tue, 2 Mar 2021 09:31:01 -0500 (EST) In-Reply-To: <20210302.120929.1656994339284323372.conao3@gmail.com> (Naoya Yamashita's message of "Tue, 02 Mar 2021 12:09:29 +0900 (JST)") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:265832 Archived-At: > That testcase comes from this code (src/eval.c:L1014) which we already had. > > else if (! NILP (Fcdr (Fcdr (elt)))) > signal_error ("`let' bindings can have only one value-form", elt); Yes, some people disagree with my me ;-) > I tried to remove this, my temp Emacs works like this in *scratch* buffer. > > (let ((a 1 2)) > a) ; Type C-j > 1 > > This is very strange I think. I still think it's important for > Emacs, even as an interpreter, to produce errors. I view the ELisp interpreter as a crutch to bootstrap the system. AFAIK the only really good reason why we still have it is for the benefit of debugging: debugging byte-compiled code (whether with Edebug or with the backtrace debugger) is a lot more constraining than debugging interpreted code, mostly because it loses the information about the currently bound lexical variables. All other uses of it could be replaced by something like (defun eval (exp) (funcall (byte-compile `(lambda () ,exp)))) Stefan