[Q] do: ifNotEmpty: ifNotEmptyDo and A proposal for avoiding many bugs

Bert Freudenberg bert at impara.de
Mon Dec 6 09:59:35 UTC 2004


Am 06.12.2004 um 09:59 schrieb Lic. Edgar J. De Cleene:

>  And still don't understand way do: if for
> each element and ifNotNilDo: not.

Simple, #ifNotNilDo: is badly named. ...do: should imply iteration, but 
here it does not. We just have not found any equivalent, yet short, 
easy to remember, and intention revealing name. We had #ifNotNilIn: or 
#ifNotNilEval: but all that is much less readable than #ifNotNilDo:. I 
think Marcus suggested that #ifNotNil: could take an optional 
parameter, which I do like, but then the selector hardly communicates 
its intent. So ... if someone has a nice alternative, let's change it.

- Bert -




More information about the Squeak-dev mailing list