Tk Library Source Code

View Ticket
Login
Ticket UUID: 987305
Title: uuid::compare should be uuid::equal
Type: Bug Version: None
Submitter: jenglish Created on: 2004-07-08 14:01:44
Subsystem: None Assigned To: patthoyts
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2004-07-09 05:30:27
Resolution: Fixed Closed By: patthoyts
    Closed on: 2004-07-08 22:30:27
Description:
From the uuid manpage:

| ::uuid::uuid compare id1 id2
|                                                     
                           
| Compares two uuids. If equal the result is 0 
| otherwise the result will be either +1 or -1.

It's almost never necessary to check if one UUID is
less than or greater than another; UUIDs don't really
have a natural ordering relation.  

It's far more common to check UUIDs for equality.  I'd
suggest that:

| ::uuid::uuid equal $id1 $id2
|  Returns 1 if $id1 and $id2 are equal, 0 otherwise.

would be a more useful API.
User Comments: patthoyts added on 2004-07-09 05:30:27:
Logged In: YES 
user_id=202636

Agreed. Interface changed.