On 6/1/2015 2:52 PM, Britt Durbrow wrote:
I personally find early returns to be very useful, and also make use of forward-jumping goto statements sometimes (i.e, goto bail;).
FWIW, while I embrace both early returns and the goto statement where it makes sense, for the case you make, I would use a break statement inside a do block:
#define end_do while (0) do { if ( bailCondition ) break; if ( someOtherBailCondition ) break; ... } end_do;This creates another level of indentation, but structurally, that's the point.
However, when working on somebody else’s code (like, say, an open-source library); I’ll adopt their coding style, even if some of the things they do make my eyes itch. ;-)
We are cut from the same cloth, there. Paul -- Paul Scott psc...@skycoast.us
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com