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: Bug#38708: eq vs eql in byte-compiled code Date: Wed, 01 Jan 2020 10:45:55 -0500 Message-ID: References: <8cd1b5b2-b94e-ce64-0d70-c1b8b012d685@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="9103"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Mattias =?windows-1252?Q?Engdeg=E5rd?= , Pip Cet , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 01 16:46:13 2020 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1imgCK-0002Gb-VG for ged-emacs-devel@m.gmane.org; Wed, 01 Jan 2020 16:46:13 +0100 Original-Received: from localhost ([::1]:59358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imgCJ-0008D5-L6 for ged-emacs-devel@m.gmane.org; Wed, 01 Jan 2020 10:46:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44851) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1imgCA-00088j-Iy for emacs-devel@gnu.org; Wed, 01 Jan 2020 10:46:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1imgC9-0007C0-6G for emacs-devel@gnu.org; Wed, 01 Jan 2020 10:46:02 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24946) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1imgC8-00076v-UQ for emacs-devel@gnu.org; Wed, 01 Jan 2020 10:46:01 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E145B81099; Wed, 1 Jan 2020 10:45:59 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 362B18033D; Wed, 1 Jan 2020 10:45:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1577893558; bh=FxWhQvs1g4EmBaAN+Hu1Y6PTaH7WfrUFA7yzRqCo2e0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=aLD1bBGwRLlh/qi9GPNDYUioUX30dwKdfl5PyuROsTR20ZdsNy5Qgdp4rQ5j9rns7 1pt5YgW3uxVxm4jsShW3r1k7KHw3FTmzyML5Ivgs/JL7XIpi/9ik4vIYssMD29ZOhF TesNyDDQ3aPxGYXi2MZI5nUonBleRGm8RmoUrBJEwuc5/2pdCOC0I0WU4+Q1r4EaM7 UB9kEgUlu85wp7BefDqEUk0LmmxhT+NaBMcRkrWb7mb5mdEGgsZaS5GF3lr18LoopW iezg/Ez4EzDjB59weTefDeiEFSw7ZJUh/T4N+bcUfeKCNwYLTx0cGN5DmtL06YcVQm el2lFnSevi6DQ== Original-Received: from alfajor (reservations.lactaureau.com [208.77.84.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E27D91209B5; Wed, 1 Jan 2020 10:45:57 -0500 (EST) In-Reply-To: <8cd1b5b2-b94e-ce64-0d70-c1b8b012d685@cs.ucla.edu> (Paul Eggert's message of "Tue, 31 Dec 2019 09:38:18 -0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243837 Archived-At: >> For example, this code will produce t: >> (defun my-eq (a b) (eq a b)) >> (defun f () (xor (eq 1.0 1.0) (my-eq 1.0 1.0))) >> (byte-compile 'f) >> (f) Such paradoxes are just what you get from using `eq`. We could eliminate this one in some ad-hoc way, but there'd still be a million others. AFAIK people here have decided (to my chagrin) that `eq` should stay distinct from `eql`, so these paradoxes are considered as "features". > How about going a bit further, and globally deduplicating all flonums > and bignums that result from low-level text-to-number conversion and > module imports? I don't see the benefit. All it would do, AFAICT, is to make it more difficult to "manually" reproduce/show those eq-paradoxes, so people will be even more stumped when their code gets nil whereas redoing the test by hand with M-: returns t (which again, is part of the "fetureset" of `eq`, but still). We could/should do hash-consing of bignums, tho. It won't affect code that doesn't use bignums, and should have a fairly minor performance cost for bignums while making their semantics more clean. Stefan