GNU bug report logs - #14792
Error in manual "(guile-2) Object Properties"

Previous Next

Package: guile;

Reported by: David Kastrup <dak <at> gnu.org>

Date: Thu, 4 Jul 2013 18:05:02 UTC

Severity: normal

Tags: patch

Merged with 18223

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 14792 <at> debbugs.gnu.org (full text, mbox):

From: David Kastrup <dak <at> gnu.org>
To: Mark H Weaver <mhw <at> netris.org>
Cc: 14792 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#14792: Error in manual "(guile-2) Object Properties"
Date: Tue, 16 Jul 2013 20:46:29 +0200
Mark H Weaver <mhw <at> netris.org> writes:

> I can easily think of many possible uses for this, e.g. for memoizing
> unary numeric functions, associating application-specific data
> structures with file descriptors or array indices, etc.
>
> Regardless, our manual has been telling people they could do this for a
> long time.  To make matters worse, those who have tried using
> object-properties have likely observed that it works as advertised.
> They probably don't realize that it will silently fail for large
> integers.

Fixing the documentation will not change the behavior.  So they are not
worse off than before.

> '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.

When calling a thing an "object property", it is not helpful when it
does not behave like one.

-- 
David Kastrup




This bug report was last modified 10 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.