In our previous episode (Sunday, 03-Mar-2013), steve harley said: >> and, logically, in the run handler >> >> if the result is false then >> return >> else >> … rest of block > > philosophically, i use "early exits" a lot to save time and avoid excess > structure (depending on the language, too);
Ah, I am just the opposite then. I will add structure to make things as clear as possible, so I am far more likely to write if false then do this else do that end even if do this or do that are empty, just in case I need that logic block later I find it is much simpler to see what I did and add code in the right place than try to tack on that structure later on. > however since i have only one early exit here, what i did seems superfluous; > maybe there were some other tests there before, but now it might as well be: > > if the_choice is not false then > … rest of block Ahhhh! run away! :) -- I HAVE NEITHER BEEN THERE NOR DONE THAT Bart chalkboard Ep. AABF17 _______________________________________________ MacOSX-talk mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-talk
