Oct. 7, 2008
10:02 p.m.
When I think about this issue in different terms I think it makes more sense. No matter how perfect my code I find myself interfacing to things like MySQL where it is happy to return nil when it means an empty string. someValue ifNotUsefulUse: [ defaultValue ]. but then the question "what does useful mean", at which point it becomes easier to define clearly what is not useful i.e. someValue ifNilOrEmpty: [ defaultValue ]. If I had known this call existed I would use it much more because b := someValue ifEmpty: [ defaultValue ]. doesnt work (see earlier discussions on squeak-dev) regards Keith