This is the mail archive of the kawa@sourceware.org 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]
Other format: [Raw text]

Re: equal? and primitive arrays


On Oct 7, 2011, at 10:33 PM, Jamison Hope wrote:

I'll tackle the primitive arrays for now and think about how to handle
cycles as a separate patch.

Here's what I came up with. I get the expected successes and failures for statements like (test-equal (byte[]) (byte[])) or (test-equal (byte[] 1 2) (long[] 1 2)).

I marked the recursive calls to apply() with "FIXME handle cycles".

I'm a little uncertain what the correct behavior should be for edge
cases like comparing a String[] to an FString[] in which each pair
of elements are equal?. For now, that will return #f because the
array component types are not equal (in the Java sense).

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


Attachment: IsEqual.patch
Description: Binary data


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