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 6567707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:22:09+00:00 2026-05-25T14:22:09+00:00

I never use ivars. I only use properties — sometimes assign properties with primitive

  • 0

I never use ivars. I only use properties — sometimes assign properties with primitive types, and sometimes on a “private” class extension. I’ve seen the advantages of not using ivars in switching to ARC — I have some borrowed code with lots of ivars that I still can’t “ARC”, since I don’t know what needs to be retained. So I know some advantages of not using ivars, but what are the advantages of using ivars instead of properties?

Note: I depend exclusively on the ivars that are automagically added in (by the compiler?) for the property declaration.

Don’t mark to close: I’ve looked at some of the other questions, like this and this and none hit the spot. The titles look good, but like so many questions on SO, the questions are a mess of strange doubts and other stuff.

  • 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-25T14:22:09+00:00Added an answer on May 25, 2026 at 2:22 pm

    Declared properties cannot be treated in the same manner as an @protected ivar. You can declare the property in a class extension to keep it private from any other class, or declare it in the header interface to make it publicly accessible, however there is no way to make it accessible only to subclasses. This would require the ivar declaration.

    EDIT

    Just another brief thought. I have recently been writing a lot of framework classes, and I think there might be something to be said for using iVars as documentation.

    For example, let’s say you are calling some code in a tight loop and you want to ensure that it is performant. Inside that tight loop you want to access a property of a class, but need to know whether each time you call it the return value is calculated on-the-fly or stored in an iVar. Seeing the iVar in the header is a quick way to ensure that you’ll get that variable back without much overhead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use only classes and never use IDs. Many people like to use IDs
The use of XSLT (XML Stylesheet Language Transform) has never seen the same popularity
I never use the comma operator. But sometimes, when I write some recursions, I
when developing wpf applications i never use the graphical editor ( aka cider). only
I sometimes see people using the Activity.onAttachedToWindow method but personally, I did never use
By default, eclipse only puts items in the toolbar I never use. With customize
I have noticed that most Objective-C coders never use the self->ivar syntax when accessing
How do I make vi - Vim never use tabs (converting spaces to tabs,
I read somewhere that one should never use error conditions as normal program flow.
I've been using user controls extensively but never use a HttpHandler and was wondering

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.