I have never seen ReToDoRule to suggest a change that I wanted to do. 

I think it tries to detect if there is #at: send to the collection inside the 
block and suggests to use more high-level iterators.

But the suggestions are odd and it seems to be too naive with just detecting 
the #at: message send to the iterated value.

"Checks for use of to:do: when a do:, with:do: or timesRepeat: when should be 
used.”

        • #timesRepeat: does not take an argument for the block with the 
running index, so it is not a replacement
        • with:do: is not a replacement for to:do: ? it would mean creating 
first a collection and then iterating
        • using do: on an interval is bad, we even have a rule against that: 
ReUnoptimizedToDoRule


Maybe I am missing something?


The rule ReToDoCollectRule seems to be working nicely, though. 

Issue tracker entry: https://github.com/pharo-project/pharo/issues/11162


Reply via email to