• 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: Is encapsulation deprecated in ObjC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is encapsulation deprecated in ObjC?


  • Subject: Re: Is encapsulation deprecated in ObjC?
  • From: Ondra Cada <email@hidden>
  • Date: Thu, 16 Aug 2001 19:08:18 +0200

Brian,

>>>>>> Brian Hill (BH) wrote at Thu, 16 Aug 2001 11:58:33 -0500:
BH> For example, if I have a class with a *really private* instance variable
BH> that really should never, ever be accessed outside the instance, you can
BH> implement the 'get' and 'set' methods that key value coding will look
BH> for and use appropriately.

Definitely. That's why I've written

OC> (Actually, it is questionable whether it does violate encapsulation or
OC> not;...

The thing is that it kind of changes the approach: normally, a property is
private (well, protected -- unimportant here, I guess) unless said otherwise.
With key/value, the property is (by a *QUITE SPECIAL WAY*, which is IMHO
very important) public, unless you said otherwise (by implementing some
methods).

Again, anybody has to decide by himself whether it does deprecate
encapsulation or not.

(Well, _I_ think it does not, rather, but de gustibus non est disputandum!)
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Prev by Date: Re: Is encapsulation deprecated in ObjC?
  • Next by Date: sending email from a cocoa app
  • Previous by thread: Re: Is encapsulation deprecated in ObjC?
  • Next by thread: Re: Is encapsulation deprecated in ObjC?
  • Index(es):
    • Date
    • Thread