[Pharo-users] ifNotEmpty(Do):

Peter Uhnák i.uhnak at gmail.com
Sun Oct 11 10:08:33 EDT 2015


On Sun, Oct 11, 2015 at 1:11 PM, monty <monty2 at programmer.net> wrote:

> Not only isn't it easier to understand, it's harder. With collections
> "do:" normally means enumeration (do:, allButLastDo:, reverseDo:), but
> ifNotEmptyDo: doesn't enumerate the receiver.
>

But in Morphic/Spec/Bloc #widgetDo: is used very commonly (for DOing
things, not enumerating), so it depends on the context.

I think the important lesson here is that you eventually learn patterns, so
once you know what this does it's no longer less or more readable because
it became habituated.

P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20151011/cdd73c41/attachment.html>


More information about the Pharo-users mailing list