[squeak-dev] Use of ByteArray>>collect: bug, feature, nuisance,
or what?
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Sun Feb 28 09:45:54 UTC 2010
#[1 2 3 4] collect: [:ea | ea hex ] as: Array
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.
>
>
More information about the Squeak-dev
mailing list
|