[squeak-dev] Re: Dictionary>>collect: returning OrderedCollection?

nicolas cellier ncellier at ifrance.com
Sat Jun 14 18:20:27 UTC 2008


K. K. Subramaniam a écrit :
> On Saturday 14 Jun 2008 12:36:54 am nicolas cellier wrote:
>> tim Rowledge a écrit :
>>> Dictionary>do: etc work on the values of the associations. #collect:
>>> should continue the pattern. #associationsDo: etc exist if you need to
>>> work with the associations.
>>>
>>> tim
>>> --
>>> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
>>> Artificial Intelligence:  Making computers behave like they do in the
>>> movies.
>> Hi tim and Subbu,
>> you follow a certain historical logic.
>> But behaviour could be much simpler and homogeneous with ANSI POV.
> ANSI v1.9 [1] treats collect: as a transformer and only requires it to return 
> a collection. Returning a dictionary is a permitted 'refinement'.
> 
>> Consider current state of Squeak:
>>
>> 1) select: and reject: already return a Dictionary
> This is a non-sequitur. select:/reject: are discriminators while collect: is a 
> transformer.
> 
>> Original st-80 logic would have been to answer a Bag, nothing else.
> :-/. In ST-80, Dictionary isa Set isa Collection while Bag isa Collection. You 
> meant a Set, perhaps?
> 
> [1] http://wiki.squeak.org/squeak/uploads/172/standard_v1_9-indexed.pdf
> 

No, I mean Bag.
Dictionary keys are a Set, but values don't have to be unique.
If you have the blue book or a st80 available, check what values was 
originally returning.

> Subbu
> 
> 




More information about the Squeak-dev mailing list