March 2008
1 post
Closures for readability
This is really just common sense and all the cool kids are probably already doing it, but I just had a mini revelation. If your programming language supports closures (or code blocks, whatever) then you can create local closures that implement some kind of test to clean up your logical branching.
I had the situation recently where a particular bit of code was getting hard to follow. The problem...