metaeducation / rebol-issues

6 stars 1 forks source link

More discrimination in equality of tuples desired #1097

Open rebolbot opened 15 years ago

rebolbot commented 15 years ago

Submitted by: meijeru

For tuples, equality in all its four forms (from equal? to same?) ignores the value of length?, by considering all tuples to be right padded with 0, up to 10 components.

I think that at least same?, and preferably strict-equal?, should be length-aware.

Also think of the fact that same? t1 t2 does not imply same? reverse t1 reverse t2 currently

>> equal? 1.2.3 1.2.3.0
== true
>> equiv? 1.2.3 1.2.3.0
== true
>> strict-equal? 1.2.3 1.2.3.0
== true  ; should be false
>> same? 1.2.3 1.2.3.0
== true  ; should be false
>> same? reverse 1.2.3 reverse 1.2.3.0
== false ; !!

CC - Data [ Version: alpha 70 Type: Wish Platform: All Category: Datatype Reproduce: Always Fixed-in:alpha 72 ]

rebolbot commented 15 years ago

Submitted by: BrianH

Raised the priority because we are currently working on improving equality.