June 4, 2015
7:39 p.m.
Hi peter often xxx do: creates an intermediary collection while xxxDo: don't Stef Le 4/6/15 21:24, Peter Uhnák a écrit :
Hi,
is there some best practice about collectionDo: versus collection do: ?
I see many times the first used (e.g. String>>linesDo:); I see a benefit if there is no accessor to the collection, but more times than not there actually is. From my perspective it further pollutes the protocol and as a user of such method I will never be sure what to actually use without looking at the implementation to see if there is any actual difference.
So is there some consensus on this?
Thanks, Peter