• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Obj-C - your thoughts on hiding data members?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Obj-C - your thoughts on hiding data members?


  • Subject: Obj-C - your thoughts on hiding data members?
  • From: Graham Cox <email@hidden>
  • Date: Mon, 25 Jan 2016 10:55:52 +1100

In Objective-C 2, data members can be moved into a @interface MyClass () section which lives in the .m file, rather than in the header file as in the classic case. This makes sense - those data members are typically part of the private implementation details of a class and not part of the public interface.

But is it worth updating older code to follow this convention? I’ve updated a lot of older code to declare @properties instead of classic getters and setters, and that definitely improves readability. This is a further step I’m contemplating but the benefits are less clear. Do you generally think this is worth doing?


—Graham



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Obj-C - your thoughts on hiding data members?
      • From: Greg Parker <email@hidden>
    • Re: Obj-C - your thoughts on hiding data members?
      • From: Quincey Morris <email@hidden>
    • Re: Obj-C - your thoughts on hiding data members?
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: NSTextFields will not fully justify in 10.11
  • Next by Date: Re: Obj-C - your thoughts on hiding data members?
  • Previous by thread: View-based NSTableView and ending editing with "return"
  • Next by thread: Re: Obj-C - your thoughts on hiding data members?
  • Index(es):
    • Date
    • Thread