I don't like this form both for legibility, and the fact that it closes over the return value.
In the single line form, both foo and err are scope restricted to the if block. Found that out the hard way.