cqframework/cql-execution

Improve consistency of equality between objects

Opened this issue · 0 comments

In the current implementation, equality of data types (e.g., Quantity, Date, DateTime, etc) can be determined in multiple ways:

  1. a.equals(b)
  2. b.equals(a)
  3. equals(a, b) (and perhaps also equals(b, a))

When PR #278 is merged, it will introduce another way:

  1. Immutable.is(a, b)

The results of these operations may differ depending on which one you call and which data types are passed in. This should not be the case, as all equality operations should be consistent and commutative. Ideally, they should all be backed by the same implementation.

For additional discussion, see: #278 (comment).