|
ordinary #hash and Dictionary [was: Recap: How to empty a collection]: msg#00151lang.smalltalk.squeak.beginners
On Wed, 20 Feb 2008 00:59:57 +0100, nicolas cellier wrote: ... I see, become: does exchange #identityHash, and that makes our IdentityDictionary work, god thanks, but there is no such provision for ordinary #hash and Dictionary... But there are sufficient provisions in place, since Smalltalk-80, and most Dictionary users know about them :) However, there are plenty of ordinary things that would have the same result: dic rehash "synopsis: re-establish hash invariants, if any ". {dic includesKey: key1. There's no danger with Dictionary not finding its keys, unless you yourself do not follow the protocol. Smalltalk has no such problems; developers use #rehash after they changed the #= of keys in Set and subclasses; and please, don't tell the newcomers the contrary :) That's too much. No not too much; in other languages (especially the "popular" ones) you are not even allowed to change you strings-now *that* is too much ;-) But in Smalltalk you are supported, right from the beginning; happy Smalltalking everybody :) /Klaus
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Named Primitives et al, cdrick |
|---|---|
| Next by Date: | Re: is 0.1 a Float or a ScaledDecimal ?, Louis LaBrunda |
| Previous by Thread: | Re: Re: Recap: How to empty a collection, Michael van der Gulik |
| Next by Thread: | Re: ordinary #hash and Dictionary [was: Recap: How to empty a collection], nicolas cellier |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |