From b3a9e3d58f96b9222b6bf9d0a666d6c6317459da Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Thu, 17 Apr 2003 19:40:49 +0000 Subject: [PATCH] *** empty log message *** --- doc/goops/goops.texi | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/doc/goops/goops.texi b/doc/goops/goops.texi index 06e9ae029..dbd13ea30 100644 --- a/doc/goops/goops.texi +++ b/doc/goops/goops.texi @@ -2372,17 +2372,30 @@ as done by @code{scm-error}. @node Object Comparisons @subsection Object Comparisons -@deffn generic object-eqv? -@deffnx method object-eqv? ((x ) (y )) -@deffnx generic object-equal? -@deffnx method object-equal? ((x ) (y )) +@deffn generic eqv? +@deffnx method eqv? ((x ) (y )) +@deffnx generic equal? +@deffnx method equal? ((x ) (y )) +@deffnx generic = +@deffnx method = ((x ) (y )) Generic functions and default (unspecialized) methods for comparing two GOOPS objects. -The default methods always return @code{#f}. Application class authors -may wish to define specialized methods for @code{object-eqv?} and -@code{object-equal?} that compare instances of the same class for -equality in whatever sense is useful to the application. +The default method for @code{eqv?} returns @code{#t} for all values +that are equal in the sense defined by R5RS and the Guile reference +manual, otherwise @code{#f}. The default method for @code{equal?} +returns @code{#t} or @code{#f} in the sense defined by R5RS and the +Guile reference manual. If no such comparison is defined, +@code{equal?} returns the result of a call to @code{eqv?}. The +default method for = returns @code{#t} if @var{x} and @var{y} are +numerically equal, otherwise @code{#f}. + +Application class authors may wish to define specialized methods for +@code{eqv?}, @code{equal?} and @code{=} that compare instances of the +same class for equality in whatever sense is useful to the +application. Such methods will only be called if the arguments have +the same class and the result of the comparison isn't defined by R5RS +and the Guile reference manual. @end deffn @node Cloning Objects