Re: Q: how do you generate get/set methods?
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.