From: SourceForge.net <no...@so...> - 2007-06-07 21:57:56
|
Feature Requests item #1733078, was opened at 2007-06-07 23:23 Message generated for change (Comment added) made by orexx You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684733&aid=1733078&group_id=119701 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: Next Release Status: Open Resolution: None Priority: 5 Private: No Submitted By: Rony G. Flatscher (orexx) Assigned to: David Ashley (wdashley) Summary: Please add a clarification to the '==' method in 'Object' Initial Comment: The current documentation for the Object's "==" method without an argument states (e.g. <http://www.oorexx.org/rexxref/x9980.htm#COO>): "Returns 1 (true) or 0 (false), the result of performing a specified comparison operation. If you specify the == operator and omit argument, a string representation is returned representing a hash value for Set, Bag, Table, Relation, and Directory." Suggested addition at the end of this paragraph to clarify that that hash value cannot be used to determine the identity of an object: ---------- cut here --------- Please note: different objects may generate the same hash value occasionally, therefore this value cannot be regarded to be a "unique identifier". ---------- cut here --------- ---------------------------------------------------------------------- >Comment By: Rony G. Flatscher (orexx) Date: 2007-06-07 23:57 Message: Logged In: YES user_id=662126 Originator: YES O.K., then this would be it: ---------- cut here --------- Please note: different objects may generate the same hash value, therefore this value cannot be regarded to be a "unique identifier". ---------- cut here --------- ---------------------------------------------------------------------- Comment By: Rick McGuire (bigrixx) Date: 2007-06-07 23:53 Message: Logged In: YES user_id=1125291 Originator: NO I'd leave off the probability bit. Remove the word "occasionally" from your original wording, and I'm fine with it. ---------------------------------------------------------------------- Comment By: Rony G. Flatscher (orexx) Date: 2007-06-07 23:33 Message: Logged In: YES user_id=662126 Originator: YES Agreed, how about: --------- cut here --------- Please note: it is very likely that different objects will generate the same hash value, therefore this value cannot be regarded to be a "unique identifier". ---------- cut here --------- ---------------------------------------------------------------------- Comment By: Rick McGuire (bigrixx) Date: 2007-06-07 23:30 Message: Logged In: YES user_id=1125291 Originator: NO I strongly disagree with this wording. Different objects will generate the same hash value more than just "occasionally". It is frequently a requirement that they generate the same has value. Consider the following sequence: a = "abc" b = "ab"||"c" the variables "A" and "B" point to different instances of the string class, each with the internal value "abc". These two instances must return the same value for their hashes otherwise hash table lookups using these two strings would not succeed. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=684733&aid=1733078&group_id=119701 |