unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: Mark H Weaver <mhw@netris.org>
Cc: 14792@debbugs.gnu.org, "Ludovic Courtès" <ludo@gnu.org>
Subject: bug#14792: Error in manual "(guile-2) Object Properties"
Date: Tue, 16 Jul 2013 21:30:50 +0200	[thread overview]
Message-ID: <87y5968fpx.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <874nbu2uwf.fsf@tines.lan> (Mark H. Weaver's message of "Tue, 16 Jul 2013 14:59:28 -0400")

Mark H Weaver <mhw@netris.org> writes:

> Hi David,
>
> David Kastrup <dak@gnu.org> writes:
>
>> Mark H Weaver <mhw@netris.org> writes:
>>
>>> 'eqv?' is Scheme's fundamental "operational equivalence" predicate.
>>> 'eq?' is just an ugly efficiency hack, a poor cousin of 'eqv?' that
>>> fails in surprising ways.  No _correct_ program is ever broken by making
>>> 'eq?' an alias to 'eqv?'.  Many programs contain subtle bugs because of
>>> their inappropriate use of 'eq?'.
>>>
>>> What's the argument on the other side?  Is there a compelling reason to
>>> use 'eq?' instead of 'eqv?' for object properties?
>>
>> object identity is checked by eq? and is conceptually different from
>> value equality.
>
> The Scheme standards don't support your view.  The _only_ difference
> between 'eq?' and 'eqv?' is that 'eqv?' is well-defined on numbers and
> characters, whereas 'eq?' is unspecified for those types.

And why would that be if numbers were proper objects?  The difference is
_exactly_ there because they aren't.

> Numbers and characters do not have any notion of "object identity",
> apart from operational equivalence.

Which is why it does not make a lot of sense to assign "object
properties" to them.

-- 
David Kastrup





  reply	other threads:[~2013-07-16 19:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 18:03 bug#14792: Error in manual "(guile-2) Object Properties" David Kastrup
2013-07-05 16:37 ` Mark H Weaver
2013-07-06 21:21   ` Ludovic Courtès
2013-07-16 15:59     ` Mark H Weaver
2013-07-16 18:46       ` David Kastrup
2013-07-16 18:59         ` Mark H Weaver
2013-07-16 19:30           ` David Kastrup [this message]
2013-07-16 19:52             ` Mark H Weaver
2013-07-16 20:01               ` David Kastrup
2013-07-16 18:53       ` Ludovic Courtès
2013-07-27 21:19 ` bug#14792: Actually, this discussion is moot David Kastrup

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y5968fpx.fsf@fencepost.gnu.org \
    --to=dak@gnu.org \
    --cc=14792@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=mhw@netris.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).