W
walter
(Note: I sent a similar email last night in response to Matz, but
did not see it. I apologize if this is basically a duplicate.)
Hash#== should be for would be content equals and not
content and default value/proc equal. I think that most common case
for == would be content equality.
Hash#=== as Nobu pointed out === would make more sense to be a
membership test, i.e., alias for Hash#key?.
Hash.eql? should be content equal and default value/block (i.e what
the current == is now). There is some precedence for this in Numeric
where 1 == 1.0 is true but 1.eql?(1.0) is false. I see this as being
very similar circumstance.
Thanks for listening,
Walt
*****************************************************
Walter Szewelanczyk
IS Director
M.W. Sewall & CO. email : (e-mail address removed)
259 Front St. Phone : (207) 442-7994 x 128
Bath, ME 04530 Fax : (207) 443-6284
*****************************************************
did not see it. I apologize if this is basically a duplicate.)
Hash#== should be for would be content equals and not
content and default value/proc equal. I think that most common case
for == would be content equality.
Hash#=== as Nobu pointed out === would make more sense to be a
membership test, i.e., alias for Hash#key?.
Hash.eql? should be content equal and default value/block (i.e what
the current == is now). There is some precedence for this in Numeric
where 1 == 1.0 is true but 1.eql?(1.0) is false. I see this as being
very similar circumstance.
Thanks for listening,
Walt
*****************************************************
Walter Szewelanczyk
IS Director
M.W. Sewall & CO. email : (e-mail address removed)
259 Front St. Phone : (207) 442-7994 x 128
Bath, ME 04530 Fax : (207) 443-6284
*****************************************************