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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:40:30+00:00 2026-06-14T19:40:30+00:00

Currently I can write a class like this: @interface Foo @property(assign) float bar; @end

  • 0

Currently I can write a class like this:

@interface Foo
@property(assign) float bar;
@end

@implementation Foo

- (void) someMethod
{
    _bar = 4;
}

@end

It’s convenient that I can leave out the @synthesize boilerplate list, and if I can get used to the underscore notation, I get the nice readable rule that everything named _foo is an instance variable. Is it OK to use the auto-generated instance variables like this? I mean, maybe they’re supposed to be invisible even to the class author?

  • 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-06-14T19:40:32+00:00Added an answer on June 14, 2026 at 7:40 pm

    Yes, it is absolutely OK to use these variables.

    Dropping the @synthesize requirement altogether was a convenience: the @synthesize xyz is now inserted implicitly – that is the only difference. Designers of the compiler reasoned that since they can unambiguously identify situations when you want to synthesize accessors vs. situations when you provide custom implementations, it is reasonable to stop asking you for an explicit @synthesize.

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

Sidebar

Related Questions

My UsersControllerTest currently fails because I use verify_recaptcha in UsersController#create. How can I write
I need to write cross-platform GUI application, what toolkit can I use? Currently I
How can i write this correctly ? I want to check how many days
I am currently writting programs in linux like this: From the command line I
Using Delphi 2010, let's say I've got a class declared like this: TMyList =
I'm designing a QT4 class. So far my class looks like this: class GIHNode
How can I enforce that my test class covers a particular interface? Also is
I am currently trying to design a client-server application, something like this: the user
I'm new to Django and currently write an application, where users can enter their
Currently I can set ringtones and notifications with: byte[] buffer = null; InputStream fIn

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.