[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14792: Error in manual "(guile-2) Object Properties"
From: |
David Kastrup |
Subject: |
bug#14792: Error in manual "(guile-2) Object Properties" |
Date: |
Tue, 16 Jul 2013 20:46:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Mark H Weaver <address@hidden> 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
- bug#14792: Error in manual "(guile-2) Object Properties", David Kastrup, 2013/07/04
- bug#14792: Error in manual "(guile-2) Object Properties", Mark H Weaver, 2013/07/05
- bug#14792: Error in manual "(guile-2) Object Properties", Ludovic Courtès, 2013/07/06
- bug#14792: Error in manual "(guile-2) Object Properties", Mark H Weaver, 2013/07/16
- bug#14792: Error in manual "(guile-2) Object Properties",
David Kastrup <=
- bug#14792: Error in manual "(guile-2) Object Properties", Mark H Weaver, 2013/07/16
- bug#14792: Error in manual "(guile-2) Object Properties", David Kastrup, 2013/07/16
- bug#14792: Error in manual "(guile-2) Object Properties", Mark H Weaver, 2013/07/16
- bug#14792: Error in manual "(guile-2) Object Properties", David Kastrup, 2013/07/16
- bug#14792: Error in manual "(guile-2) Object Properties", Ludovic Courtès, 2013/07/16
bug#14792: Actually, this discussion is moot, David Kastrup, 2013/07/27