Re: odd behavior with NSError?
Re: odd behavior with NSError?
- Subject: Re: odd behavior with NSError?
- From: Jens Alfke <email@hidden>
- Date: Fri, 2 Oct 2009 12:56:12 -0700
On Oct 2, 2009, at 4:05 AM, Gregory Weston wrote:
It would be a good idea to get into the habit of initializing your
local variables at the point of declaration.
At the risk of starting a religious debate, I disagree. It makes the
code somewhat bigger and slower, and worse, it can mask uninitialized-
variable errors that the compiler can otherwise catch for you (if you
turn on the right warning flag, which unfortunately only works in
optimized builds.)
I prefer to declare variables only at the point where they're first
used, which means that most variables get initialized anyway with non-
redundant values.
In the case here, initializing the variable doesn't actually help, as
Bill pointed out.
—Jens_______________________________________________
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