/[guile]/guile/guile-core/doc/goops/goops.texi
ViewVC logotype

Diff of /guile/guile-core/doc/goops/goops.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.5 by ossau, Fri Nov 8 00:11:28 2002 UTC revision 1.2.2.6 by mdj, Thu Apr 17 18:47:07 2003 UTC
# Line 26  Guile Line 26  Guile
26  @ifinfo  @ifinfo
27  This file documents GOOPS, an object oriented extension for Guile.  This file documents GOOPS, an object oriented extension for Guile.
28    
29  Copyright (C) 1999, 2000, 2001 Free Software Foundation  Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation
30    
31  Permission is granted to make and distribute verbatim copies of  Permission is granted to make and distribute verbatim copies of
32  this manual provided the copyright notice and this permission notice  this manual provided the copyright notice and this permission notice
# Line 2372  as done by @code{scm-error}. Line 2372  as done by @code{scm-error}.
2372  @node Object Comparisons  @node Object Comparisons
2373  @subsection Object Comparisons  @subsection Object Comparisons
2374    
2375  @deffn generic object-eqv?  @deffn generic eqv?
2376  @deffnx method object-eqv? ((x <top>) (y <top>))  @deffnx method eqv? ((x <top>) (y <top>))
2377  @deffnx generic object-equal?  @deffnx generic equal?
2378  @deffnx method object-equal? ((x <top>) (y <top>))  @deffnx method equal? ((x <top>) (y <top>))
2379    @deffnx generic =
2380    @deffnx method = ((x <number>) (y <number>))
2381  Generic functions and default (unspecialized) methods for comparing two  Generic functions and default (unspecialized) methods for comparing two
2382  GOOPS objects.  GOOPS objects.
2383    
2384  The default methods always return @code{#f}.  Application class authors  The default method for @code{eqv?} returns @code{#t} for all values
2385  may wish to define specialized methods for @code{object-eqv?} and  that are equal in the sense defined by R5RS and the Guile reference
2386  @code{object-equal?} that compare instances of the same class for  manual, otherwise @code{#f}.  The default method for @code{equal?}
2387  equality in whatever sense is useful to the application.  returns @code{#t} or @code{#f} in the sense defined by R5RS and the
2388    Guile reference manual.  If no such comparison is defined,
2389    @code{equal?} returns the result of a call to @code{eqv?}.  The
2390    default method for = returns @code{#t} if @var{x} and @var{y} are
2391    numerically equal, otherwise @code{#f}.
2392    
2393    Application class authors may wish to define specialized methods for
2394    @code{eqv?}, @code{equal?} and @code{=} that compare instances of the
2395    same class for equality in whatever sense is useful to the
2396    application.  Such methods will only be called if the arguments have
2397    the same class and the result of the comparison isn't defined by R5RS
2398    and the Guile reference manual.
2399  @end deffn  @end deffn
2400    
2401  @node Cloning Objects  @node Cloning Objects

Legend:
Removed from v.1.2.2.5  
changed lines
  Added in v.1.2.2.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26