Re:Avoid Null Checks by Replacing Finders with Tellers
by bandushrew on Monday June 17, 2013 @05:21PM
(#5896031)
that has got nothing to do with blocks.
you could have pretty much the same code in any language by doing something like:
List personList=database.personListForID(id)
for(person in personList)
{
person.setPhoneNumber(phoneNumber)
}
Personally I prefer that idiom over null checks, it is a lot easier to read.
I do like the OP names for 'Finder' vs 'Teller' though, that is a good way to describe the difference, that I haven't heard before.
you could have pretty much the same code in any language by doing something like:
Personally I prefer that idiom over null checks, it is a lot easier to read. I do like the OP names for 'Finder' vs 'Teller' though, that is a good way to describe the difference, that I haven't heard before.