in reply to (tye)Re3: eq or == with references
in thread eq or == with references
That which cannot be added, incremented, etc. is not a number. A reference cannot be added, incremented, etc. Therefore a reference is not a number. The numeric comparison operator '==' is for comparing numbers. A reference is not a number. Therefore Larry and company should not permit the use of '==' to compare references, only numbers.
I also do not understand the statement that using '==' is more efficient when comparing references than is 'eq'. It seems to me that what we have here is an "amplifier that goes up to 11" type of argument (for those who have seen the film Spinal Tap.) Larry could simply take the algorithm that he uses for the '==' operator and use it for the 'eq' operator when comparing references (just as that amplifier maker could have taken whatever loudness he called 10 and instead called it 11.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re4: eq or == with references
by tye (Sage) on Jul 09, 2001 at 19:51 UTC | |
by sierrathedog04 (Hermit) on Jul 09, 2001 at 22:30 UTC |