• 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
Re: Q: how do you generate get/set methods?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: how do you generate get/set methods?


  • Subject: Re: Q: how do you generate get/set methods?
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 21 Jan 2004 09:02:02 -0800

On Jan 21, 2004, at 4:53 AM, Karl Goiser wrote:
Sir, I think you have fundamentally missed my point! From other comments it was probably that my writing was unclear:

Looks like that may have been the case.

It was not my intention to argue that instance variables should not have public accessor methods. As you point out, model objects are a trivial example of a valid case. I was trying to argue that public accessor methods are good where the design warrants, but that automatic creation of public accessor methods opens the object totally and breaks the principle of encapsulation.

I think the issue is the work "automatic". I don't think anyone was suggesting that accessor methods be generated "mindlessly" from instance variables listed in a .h file. The idea was that, given an instance variable for which your design required accessors, you could automatically generate the code for those accessors...

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Q: how do you generate get/set methods? (From: Alexander Spohr <email@hidden>)
 >Re: Q: how do you generate get/set methods? (From: mmalcolm crawford <email@hidden>)
 >Re: Q: how do you generate get/set methods? (From: Karl Goiser <email@hidden>)
 >Re: Q: how do you generate get/set methods? (From: mmalcolm crawford <email@hidden>)
 >Re: Q: how do you generate get/set methods? (From: Karl Goiser <email@hidden>)

  • Prev by Date: Re: Question about multi-processing, multi-threading...
  • Next by Date: NSSearchField loses focus
  • Previous by thread: Re: Q: how do you generate get/set methods?
  • Next by thread: Re: Q: how do you generate get/set methods?
  • Index(es):
    • Date
    • Thread