Oct. 31, 2016
3:15 p.m.
2016-10-31 12:11 GMT-03:00 Norbert Hartl <norbert@hartl.name>:
Am 31.10.2016 um 15:59 schrieb phil@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