[squeak-dev] Dictionary>>addAll:
Bert Freudenberg
bert at freudenbergs.de
Tue Aug 24 08:59:15 UTC 2010
I always use
{'foo' -> 'bar'. 'hello' -> 'world'} as: Dictionary
so I haven't run into that problem ...
I'm not sure tinkering with Dictionary>>addAll: is a good idea. It certainly is counter-intuitive, but consistent.
- Bert -
On 24.08.2010, at 09:46, Nicolas Cellier wrote:
> You mean you'd like to use associationsDo: like in Dictionary class>newFrom: ?
> OK, it would work both for a list of associations and a Dictionary argument.
>
> Con: IMHO Collection>>associationsDo: is a tricky hack, and I don't like it.
> Pro: since the trick is already in use, Squeak behaviour would be a
> bit more homogeneous and less surprising.
>
> Nicolas
>
> 2010/8/24 Andreas Raab <andreas.raab at gmx.de>:
>> Hm ... tell me what you *think* this code would do:
>>
>> dict := Dictionary withAll: {'foo' -> 'bar'. 'hello' -> 'world'}.
>>
>> then run it. Does that seem right to you?
>>
>> Cheers,
>> - Andreas
>>
>>
>
More information about the Squeak-dev
mailing list
|