heckj/CRDT

Is the constraint on List.T conforming to Comparable necessary?

jefflovejapan opened this issue · 3 comments

Apologies if this isn't the right venue to ask the question, but is it really necessary for the elements of List to be comparable? I don't see anywhere that the elements are being compared against one another, and commenting out the constraint doesn't prevent compilation or cause tests to fail.

heckj commented

hi @jefflovejapan - perfectly fine venue for the question. Nope, not required at all. Leftover, I suspect, from my own explorations. The value does need to be hashable and equatable because the underlying storage is within a set, but that doesn't require comparable at all.

heckj commented

I just dropped it from the code, since it wasn't needed - reflected on the main branch.

Awesome, thanks @heckj !