lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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

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).