To me, Style A is much clearer and more logical. Style B is favoured by
those who prefer obfuscated code. Just my opinion, of course...

Perhaps more importantly, there is presumably a reason why, in some cases,
the fast path result cannot be used. Therefore the first line in Style B
will result in an error/exception/whatever, depending on the language, or
if it doesn't, the variable 'result' will contain junk until such time as
the slow path has been completed. In fact, in light of that argument, I'd
struggle to find any justification for using Style B over Style A.

Keith

-- 
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------

Reply via email to