Design Element
Comment on "New Objective-C Tutorial"
by Mike F. — Apr 14
Hello! I'm new to Cocoa and Objective-C, and have been finding your site and articles very useful.

When reading this, I noticed that in your section on Accessors (2), you state, "All instance variables are private in Objective-C by default."

However, in the Objective-C guide from Apple, they state, "By default, all unmarked instance variables (like name above) are @protected." (p.38)

That confused me slightly, but since you don't really mention the concept of protected vs. private variables in your tutorial, I'm also not sure whether it is an intentional simplification.

Thanks for your excellent work on the community's behalf!
Back to "New Objective-C Tutorial"
Design Element

Copyright © Scott Stevenson 2004-2015