Re: Good idea/bad idea?
Re: Good idea/bad idea?
- Subject: Re: Good idea/bad idea?
- From: Alex Zavatone <email@hidden>
- Date: Fri, 25 Apr 2014 10:56:38 -0400
On Apr 25, 2014, at 10:38 AM, Andy Lee wrote:
> On Apr 25, 2014, at 10:22 AM, Sean McBride <email@hidden> wrote:
>> The 'if form' is arguably better for testing too. Many code coverage tools are line-based, and with this form it's easier to see if your test cases cover going in the branch and not.
>
> Sure, and similarly for plain old stepping through the code. Xcode steps over a whole ?: expression at once, and doesn't show you which branch it took.
>
> --Andy
That is an important stipulation for this approach.
On the plus side, one little use case for this is to perform NSLogs in the case of a nil result, therein performing a lightweight debugging operation.
It's actually the original request I got for this briefer approach.
- Alex
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden