Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6921109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:14:02+00:00 2026-05-27T10:14:02+00:00

When reading apple generated template code as well as in documentation, I see _

  • 0

When reading apple generated template code as well as in documentation, I see _ (underscore) and __ (double underscore). Example would be the code generated on checking off core data option:

@synthesize window = _window;
@synthesize managedObjectContext = __managedObjectContext;
@synthesize managedObjectModel = __managedObjectModel;
@synthesize persistentStoreCoordinator = __persistentStoreCoordinator;

What does each of this mean? I understand _ refers to a backing private variable. What does __ mean?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:14:02+00:00Added an answer on May 27, 2026 at 10:14 am

    Apple’s documentation suggest NOT to use single underscores in your project (as it reserved by apple itself: best-known example is _cmd ). But underscore is traditional c-style modifier for privateness of identifier, so double underscore is a solution to make private identifier for your variable.

    http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CodingGuidelines/Articles/NamingMethods.html

    Names of most private methods in the Cocoa frameworks have an
    underscore prefix (for example, _fooData ) to mark them as private.
    From this fact follow two recommendations.

    Don’t use the underscore character as a prefix for your private methods. Apple reserves this convention.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

As a Java developer who is reading Apple's Objective-C 2.0 documentation: I wonder what
From reading the Apple Docs on Core Data, I've learned that you should not
I was reading the apple documentation for memory management , and came across something
I was reading on a blog that there's a GLImageProcessing example from apple. I
I'm new in iPhone development and after reading Apple documentation and several posts here
Reading the Apple documentation on the UITabBar states, The most common use of a
Reading Apple documentation i found that UIEventTypeMotion is useful only to intercept Shake. It
I was reading Apple's documentation, The Objective-C Programming Language (PDF link). On pg. 18,
I'm reading Apple's documentation on using QTKit to capture streaming audio and video from
I was reading at an apple site that shark captures everything that is running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.