News for hackers. Stuff that matters.
Re:Avoid Null Checks by Replacing Finders with Tellers by radiowave on Monday June 17, 2013 @05:04PM (#5895952)
It may be I'm missing something here. Do we really need to tack block handling onto every method that can change some state? I don't see any benefit over the following idiomatic Smalltalk:

  (self dataSource getPersonById: id) ifNotNil: [:person |
  	"operate on person here"	
  ].
(There's also ifNil:ifNotNil: for where you want to handle both cases.)

There are no comments on this comment yet.