March 12, 2019
3:40 p.m.
I don't like either of those and use #keysAndValuesDo: as it is polymorphic with other collection classes. That said, I'd prefer #withIndexDo: [:each :index | ... ] because it preserves the #with:do: structure. e.g. #($a $b $c) with: (1 2 3) do: [:char :number | ... ] Regards, Esteban A. Maringolo El mar., 12 mar. 2019 a las 12:27, Oleksandr Zaytsev (<olk.zaytsev@gmail.com>) escribió:
Hello,
I am working on a new collection and this question caught my interest. Between doWithIndex: or withIndexDo:, which do you find more logical and why?
Oleks