Re: Comparing DS_HASH_TABLE objects
Paul Cohen <[email protected]> Thu, 4 Jun 2009 01:42:29 +0200
| Newsgroups | gmane.comp.lang.eiffel.gobo.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jun 3, 2009 at 6:36 PM, Helmut Brandl <[email protected]> wrote: > In my opinion the notion of equality in Eiffel is not very consistent. I would say it is consistent, but definitely not trivial. :-) The general notion of equality is certainly not trivial! > 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. > The we have the difference between deep equality and normal equality. In > generic classes like hash tables or even simple arrays it is difficult > to take all the differences into account. Yes. I agree. > So for me, the problem is not in Eric's implementation of the hash > tables, the problem is in the concept of equality in Eiffel. No. I just want to be clear that my postings are in no way a criticism of DS_HASH_TABLE. I just wanted to understand and discuss the rationale and possible approaches to doing equality tests of hash tables. I think Eric's approach with moving the equality testers for keys and items "outside" of the hash table is good. /Paul -- Paul Cohen www.seibostudios.se mobile: +46 730 787 035 e-mail: paul.cohen-qf2BM/[email protected] ------------------------------------ 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/