[squeak-dev] Use of ByteArray>>collect: bug, feature, nuisance, or what?

Igor Stasenko siguctua at gmail.com
Sun Feb 28 09:57:58 UTC 2010


On 28 February 2010 11:45, Nicolas Cellier
<nicolas.cellier.aka.nice at gmail.com> wrote:
> #[1 2 3 4] collect: [:ea | ea hex ] as: Array
>
my image can't parse bytearray literals, nor having #collect:as:
:)
it's half of year old maybe.. damn.. things going too fast :)

> 2010/2/28 Igor Stasenko <siguctua at gmail.com>:
>> Hello,
>>
>> i just noticed that #collect: used for ByteArray is quite crippling.
>> #(1 2 3 4) asByteArray collect: [:ea | ea hex ]
>>
>> Sure i can do
>>
>> bytearray asArray collect: [:ea | ea hex ]
>>
>> but this is a bit confusing.. i even expected to get '^ self' in its
>> #asArray method (before trying it out), since
>> byte array is array.
>>
>> I remember someone added new protocol, collect:into: .
>> Is it adopted already? If yes, then it seems time to migrate my stuff
>> to a newer image :)
>>
>> But apart of it, do you think its ok to keep such #collect: behavior limitation?
>>
>> 'aaaaa' collect: [:ea | 1]
>> having same symthoms.. so it seems like i need to get some sleep.. :)
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list