lua-users home
lua-l archive

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


On Tuesday 25 January 2005 08:07, Adrian Sietsma wrote:
[...]
> do i want users of my C++ libraries to do that ? no.
> do i want to do that to other C++ libraries ? no. (not often)
> do i want users of my Lua libraries to do that ? why ever not!
> do i want to do that to other libraries ? of course!

May I remind everyone of Flon's Axiom?

There does not now, nor will there ever, exist a programming language in which 
it is the least bit hard to write bad programs.

My general opinion of languages with enforced data hiding is that (a) you 
cannot stop the user being a muppet; (b) enforced data hiding is a pain from 
the programmer's point of view; (c) therefore it's far easier to simply not 
bother. Document the fields and methods as being internal, and if the user 
plays with them, that's it's problem.

(Incidentally, I'm agreeing with you.)

-- 
+- David Given --McQ-+ "Gaping from its single obling socket was
|  dg@cowlark.com    | scintillating, many fauceted scarlet emerald..."
| (dg@tao-group.com) | --- Jim Theis, _The Eye of Argon_ (spelling
+- www.cowlark.com --+ original)