7

Friday Q&A Falls Behind

 3 years ago
source link: https://www.mikeash.com/pyblog/friday-qa-falls-behind.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Friday Q&A Falls Behind
mikeash.com: just this guy, you know?
Friday Q&A Falls Behind
by Mike Ash  

Too much to do, not enough time, and I'm afraid Friday Q&A just didn't quite make the cut this week. I will see if I can make it up to everybody next week. Sorry to disappoint, and check back next week!

Did you enjoy this article? I'm selling whole books full of them! Volumes II and III are now out! They're available as ePub, PDF, print, and on iBooks and Kindle. Click here for more information.

Comments:

Embarrassed to ask this but it's something I've ignored forever. Can you discuss the ins and outs of these scenarios?
a)
@interface
{
   NSArray* array;
}
@end

b)
@interface
{
   NSArray* array;
}
@property (retain) NSArray* array;
@end

c)
@interface
{
}
@property (retain) NSArray* array;
@end

Thanks for consider this topic.
-Phil
I'm not sure if there's much room to go in depth there, but the basics are pretty simple. For (a), you have an instance variable and that's it. No property, no accessor methods.

(b) and (c) are, I believe, the same (assuming you're doing a @synthesize in the @implementation in both cases) in general as long as you're on the "modern" runtime (64-bit Mac, iOS, iOS sim). There may be certain implementation-specific gotchas, like debugger problems and compiler bugs, with (c), but I'm not sure of the specifics there.

Comments RSS feed for this page

Add your thoughts, post a comment:

Spam and off-topic posts will be deleted without notice. Culprits may be publicly humiliated at my sole discretion.

Name:Web site:The Answer to the Ultimate Question of Life, the Universe, and Everything?Comment:Formatting: <i> <b> <blockquote> <code>. URLs are automatically hyperlinked.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK