This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: equal? and arrays


Luke Gorrie <luke@bluetail.com> writes:

> Should 'equal?' give #t for two equal arrays?

Ideally, yes.
> 
> I guess this is a side-effect of the implementation of equal(Object)
> for arrays in java?

Yes, assuming s/equal/equals/.

equals? is implemented in terms of Object.equals(Object).
It is possible to add a special case for primitive arrays,
but I am loath to give up the the equals? <--> equals
correspondance.

equal? is not the end-all of quality predicates.  For example
it would be helpful to have an equaility predicate that can
handle circular lists and trees.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]