[Cuis] Dictionary asSet

Juan Vuletich juan at jvuletich.org
Sun Mar 1 13:06:15 CST 2015


In Squeak, 'someDictionary asSet' answers a set with the values. It 
should do the same in Cuis, (like Dan and Nicolas want). Maybe we'd also 
adopt the idea of having HashedCollection as a superclass of both 
Dictionary and Set, just like in Squeak.

Any takers?

Cheers,
Juan Vuletich

On 3/1/2015 11:06 AM, Nicolas Cellier wrote:
>
>
> 2015-03-01 10:52 GMT+01:00 Casey Ransberger <casey.obrien.r at gmail.com 
> <mailto:casey.obrien.r at gmail.com>>:
>
>     I think it should probably answer a set of associations,
>     specifically, and also have a gut feeling that doing so should be
>     relatively cheap. But don't worry so much about what I think. Look
>     at what the other dialects do, consult book blue, etc...
>
>
> Please, no.
> A Dictionary behaves as a Collection of values,  it's just that it has 
> special keys for indexing its contents.
> Why should asSet do something different than asArray for example?
> If we want a set of associations, we can just write aDictionary 
> associations asSet.
>
> Nicolas
>
>     Annoying Casey behavior: can you think of an SUnit test that
>     confirms the bug? I'm not just asking you for a test case, not
>     necessarily, but it would be good to define expected behavior in a
>     way that allows us later to know that it has changed inadvertently
>     if it does.
>
>     The test is more important than the fix, if the code is to be the
>     curriculum.
>
>     --C
>
>     On Feb 28, 2015, at 6:45 PM, "Dan Norton" <dnorton at mindspring.com
>     <mailto:dnorton at mindspring.com>> wrote:
>
>>     aDictionary asSet should answer a set. Instead, it answers itself
>>     (a dictionary).
>>
>>     I tried to create a new issue but the "Submit new issue" button
>>     was disabled.
>>     _______________________________________________
>>     Cuis mailing list
>>     Cuis at jvuletich.org <mailto:Cuis at jvuletich.org>
>>     http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>     _______________________________________________
>     Cuis mailing list
>     Cuis at jvuletich.org <mailto:Cuis at jvuletich.org>
>     http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jvuletich.org/pipermail/cuis_jvuletich.org/attachments/20150301/fd201536/attachment-0004.html>


More information about the Cuis mailing list