> > 2015-03-10 13:27 GMT+01:00 Peter Uhnák <i.uh...@gmail.com>: > >> On Tue, Mar 10, 2015 at 1:23 PM, Joachim Tuchel <jtuc...@objektfabrik.de> >> wrote: >> >>> #doWithIndex: ? >>> >> >> doWithIndex: elementAndIndexBlock >> "Use the new version with consistent naming" >> ^ self withIndexDo: elementAndIndexBlock >> > > On Tue, Mar 10, 2015 at 8:36 PM, Thierry Goubier < thierry.goub...@gmail.com> wrote:
> And one has to guess that elementAndIndexBlock means > > [:each :i | ... ] ? (and of course not [:i :each | ... ] ) > The Principle Of Least Surprise would imply that the variables appear in the same order that they appear in the method name. Of course that doesn't mean you don't get surprised sometimes. Are there any that don't follow that rule? We should consider fixing them. It would be interesting if something like autocompletion could supply the template for the block. > > I'm always looking for senders with that type of code ;) arguments to > blocks are usually not documented. > > > I do too. cheers -ben