From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexandru Cojocaru Newsgroups: gmane.lisp.guile.user Subject: Are `eqv?' and `eq?' the same? Date: Sun, 25 Aug 2013 13:39:44 +0200 Message-ID: <5219ED00.9040006@gmx.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------070501030304020008060103" X-Trace: ger.gmane.org 1377430808 28718 80.91.229.3 (25 Aug 2013 11:40:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Aug 2013 11:40:08 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Aug 25 13:40:09 2013 Return-path: Envelope-to: guile-user@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 1VDYfx-0001U1-Jo for guile-user@m.gmane.org; Sun, 25 Aug 2013 13:40:09 +0200 Original-Received: from localhost ([::1]:45693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDYfx-0007w2-6S for guile-user@m.gmane.org; Sun, 25 Aug 2013 07:40:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDYfj-0007vo-E6 for guile-user@gnu.org; Sun, 25 Aug 2013 07:40:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VDYfd-0002uM-H3 for guile-user@gnu.org; Sun, 25 Aug 2013 07:39:55 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:50514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VDYfd-0002u6-7N for guile-user@gnu.org; Sun, 25 Aug 2013 07:39:49 -0400 Original-Received: from [178.132.145.13] ([178.132.145.13]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M6O1v-1Vxpns31OV-00yUVw for ; Sun, 25 Aug 2013 13:39:48 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 X-Provags-ID: V03:K0:+xt/JQTB86V5qUjWr6uQUMysBx/RzXYfQTvjJUeSiZR3JQaqmcw fj7kGAEyM+npshKgxQOoGlguEkrPSRRrzgrj/RBaX38LXiWVvDg4hvgrq7uq8Ddd86FXQWh Sh8khC4G159Bq7x+XcZOhb8yZYfriSGiEdbcN0L+KkozBJ3LGZkyLhIuXm1eZdzLwIDpQM9 1FEXujhq6OEzXD0xXcodg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:10689 Archived-At: This is a multi-part message in MIME format. --------------070501030304020008060103 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit |Hi, from the GUILE manual [0]:| || `eq?|' tests just for the same object (essentially a pointer comparison) `eqv?'| extends |`eq?'| to look at the value of numbers and characters. this is what I get: scheme@(guile-user)> (eq? 3 (+ 1 2)) $1 = #t is this behavior intentional or some type of bug? Best regards, Alexandru Cojocaru [0]: https://www.gnu.org/software/guile/manual/html_node/Equality.html --------------070501030304020008060103 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi,

from the GUILE manual [0]:


    `eq?
' tests just for the same object (essentially a pointer comparison)
    `eqv?'
extends `eq?' to look at the value of numbers and characters.

this is what I get:

    scheme@(guile-user)> (eq? 3 (+ 1 2))
    $1 = #t

is this behavior intentional or some type of bug?

Best regards,
Alexandru Cojocaru

[0]: https://www.gnu.org/software/guile/manual/html_node/Equality.html
--------------070501030304020008060103--