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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:16:40+00:00 2026-05-23T12:16:40+00:00

There are three different syntax styles for accessing properties of an object: myProp =

  • 0

There are three different syntax styles for accessing properties of an object:

myProp = value;
self.myProp = value;
[self setMyProp: value];

Are these purely style choices or is there difference in substance?

  • 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-23T12:16:40+00:00Added an answer on May 23, 2026 at 12:16 pm
    self.myProp = value;
    

    and

    [self setMyProp: value];
    

    are style choices, as they are using accessors to set values. That is, self.myProp essentially is the same as calling [self setMyProp] or [self myProp]. It will implement whatever mechanism you define in the @property tag (retaining, releasing as needed, etc).

    However,

    myProp = value;
    

    is substantially different as it is simply an assignment. No consideration for releasing myProp‘s original pointer, retaining the new value, etc.

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

Sidebar

Related Questions

I have a few problems with my mod_rewrite rules. There a three different url
http://www.dofactory.com/Patterns/PatternFlyweight.aspx There is a UML diagram on that page. It has three different kinds
Are these actually three different concepts or am I getting jumbled? (I've been reading
There are two different ways to create an empty object in JavaScript: var objectA
Certainly there's the difference in general syntax, but what other critical distinctions exist? There
In C# is there any real difference (other than syntax) under the hood between:
Is there a functional difference between the following syntax... [Foo, Bar] public class Baz
Are there different limitations as to how many connections (sockets) that can be created
I have three different configurations on my project, all three do not require all
I have three different development machines. Do I need three different iPhone Developer Program

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.