2016-10-31 12:11 GMT-03:00 Norbert Hartl <norb...@hartl.name>:
>
> Am 31.10.2016 um 15:59 schrieb p...@highoctane.be:
>
> but you should use myCollection ifEmpty: [ ... ]
>
> Why?

It enables you to implement polymorphism with an object that might not
be aCollection, but behaves like one.
Of course you could also implement #isEmpty, but in my experience the
less you test (#isEmpty) and the more you delegate (ifEmpty:) the
better. :)

Regards,

Esteban A. Maringolo

Reply via email to