[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Moving towards a class system package proposal
- From: PA <petite.abeille@...>
- Date: Sun, 23 Jan 2005 20:38:40 +0100
On Jan 23, 2005, at 20:17, Mark Hamburg wrote:
I think I'd rather worry about how to make
encapsulation work well
What about:
"If you do not want to access something inside an object, just do not
do it."
-- Roberto Ierusalimschy, December 2003
http://www.lua.org/pil/16.4.html
For instance, in Objective-C, everything is totally accessible to
anyone. But... one accesses undocumented methods/ivars at their own
risk. This seems to be quite reasonable :)
Explicit "encapsulation" is not that useful in practice. It's more of a
good practice than anything else (e.g. protecting the innocents from
themselves).
Cheers
--
PA
http://alt.textdrive.com/