Re: Comparing DS_HASH_TABLE objects

Peter Gummer <p-gummer-bzGI/[email protected]> Thu, 04 Jun 2009 11:44:11 +1000
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
Paul Cohen wrote:
>> So regardless whether an entity is reference or expanded, feature calls
>> are done in the same manner. If it comes to equality testing, we have to
>> use different operators to test for equality (surely you can write 200 ~
>> 200 instead of 200 = 200, but it reads ugly).
>>     
>
> I agree. Maybe "==". would look nicer.
>   

I think Helmut was wishing that '=' between reference types had been 
used for object equality, as it is between expanded types.

I've often wished the same thing. It would have been more intuitive. The 
'=' operator would have consistently been used to express the idea that 
two objects have the same value. Then some other operator would have 
been needed for reference equality: maybe '~'. (Your  '==' suggestion 
might have been a good choice, Paul, from a marketing perspective in 
this C-dominated world.)

On the other hand, the way that Eiffel actually uses '=' and '~' is 
probably more consistent with the mathematical notation for equality and 
equivalence, respectively. But I'm no mathematician.

- Peter Gummer



------------------------------------

To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected]! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gobo-eiffel/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/gobo-eiffel/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/