From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Israelsson Tampe Newsgroups: gmane.lisp.guile.devel Subject: things are eq? but not generated at the same time Date: Wed, 5 Sep 2012 20:44:26 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec5299febab8e8a04c8f8c370 X-Trace: ger.gmane.org 1346870677 22685 80.91.229.3 (5 Sep 2012 18:44:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2012 18:44:37 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Sep 05 20:44:39 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9KaY-00013C-43 for guile-devel@m.gmane.org; Wed, 05 Sep 2012 20:44:34 +0200 Original-Received: from localhost ([::1]:59495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9KaV-0004wc-9S for guile-devel@m.gmane.org; Wed, 05 Sep 2012 14:44:31 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9KaT-0004wO-FD for guile-devel@gnu.org; Wed, 05 Sep 2012 14:44:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9KaS-0005i3-FS for guile-devel@gnu.org; Wed, 05 Sep 2012 14:44:29 -0400 Original-Received: from mail-ie0-f169.google.com ([209.85.223.169]:35878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9KaS-0005hr-AE for guile-devel@gnu.org; Wed, 05 Sep 2012 14:44:28 -0400 Original-Received: by iec9 with SMTP id 9so1925373iec.0 for ; Wed, 05 Sep 2012 11:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=6JTo87abwkeVrEBr/ck4Rkn3zbxaIYcrznRp6zT4ZGE=; b=KgV3oX3hMVlIlVOxg5Qns+FBFxl3hsuDCtCOS3lpsQWwvXw0m9/Jk034ETrrUjN4Py 0w8201XommB5HAKTHCcT+Y6J4dbYMNR7VE1giuT4qfhG4yBHZmyxpoA+lJF6rU0mmie6 jpoJF1pBPyTxwd8DRucLGDLDSLHrfCL6jpWkmUhf4+Retl74P51KtwURzrOblP86NqOM TPWDTKb+KieSb11F5L+9hPoLF4bnYRvwnK/apr5ZfxCVh7xMdCIGXg4L1JndOrn8of3F FUXOcR89IHhEnTgz/4FywN50KNpp0T591A/cKKuGmgvirTCf/8Vp+Zve4mE5QhGuIrGu l/bw== Original-Received: by 10.43.48.129 with SMTP id uw1mr21786634icb.10.1346870667087; Wed, 05 Sep 2012 11:44:27 -0700 (PDT) Original-Received: by 10.50.171.104 with HTTP; Wed, 5 Sep 2012 11:44:26 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.223.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14856 Archived-At: --bcaec5299febab8e8a04c8f8c370 Content-Type: text/plain; charset=ISO-8859-1 Hi, I found that this optimization can lead to dangerous bugs. If I put, (define a #(1)) (define b #(1)) , load the file. Then > (eq? a b) #t Is this an optimization we need. I can figure out applications where you do not want this behavior e.g. I wan't to make distinct objects and add metadata by making a vector of it. Now different objects might have the same metadata and now go against my intuition and coerce the objects. I fear that many difficult to spot bugs will come out of this design choice! /Stefan --bcaec5299febab8e8a04c8f8c370 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I found that this optimization can lead to dangerous bugs.
If I put,

(define a #(1))
(define b #(1))

, load the fil= e. Then

> (eq? a b)
#t

Is this an optimization we need.= I can figure out applications where you do not want this behavior e.g. I w= an't to make distinct objects
and add metadata by making a vector of it. Now different objects might have= the same metadata and now go against my intuition and
coerce the object= s.

I fear that many difficult to spot bugs will come out of this des= ign choice!

/Stefan
--bcaec5299febab8e8a04c8f8c370--