aCollection ifNotEmpty: [ ... do: [ ... ] ]

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

aCollection ifNotEmpty: [ ... do: [ ... ] ]

Ben Coman
Just curious...

In AbstractTool>>renamePackages: what is gained from using...
    aCollection ifNotEmpty: [ ... do:  [ ... ]

Wouldn't "aCollection do: [ ... ]"
be more concise for the same behaviour ?

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: aCollection ifNotEmpty: [ ... do: [ ... ] ]

Marcus Denker-4

> On 20 Jul 2015, at 12:01, Ben Coman <[hidden email]> wrote:
>
> Just curious...
>
> In AbstractTool>>renamePackages: what is gained from using...
>    aCollection ifNotEmpty: [ ... do:  [ ... ]
>
> Wouldn't "aCollection do: [ ... ]"
> be more concise for the same behaviour ?
>
>

Yes! I guess that there used to be a ifEmpty: branch that got removed and the method not cleaned up.
or maybe it’s just wrong…

You can submit a fix.

        Marcus