equal? and primitive arrays

Jamison Hope jrh@theptrgroup.com
Fri Oct 7 23:06:00 GMT 2011


I was a little surprised today to discover that
(equal? (byte[] 1 2) (byte[] 1 2))
returns #f. Obviously Java arrays are outside the scope of the
Scheme report, but it would seem to be in the spirit of equal?
for that to return true. Would it be worthwhile to write a patch
for IsEqual.java to defer to java.util.Arrays#equals() and
java.util.Arrays#deepEquals() in the case of arrays?

Jamie

--
Jamison Hope
The PTR Group
www.theptrgroup.com





More information about the Kawa mailing list