[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: OO - keeping lua as lua
- From: David Given <dg@...>
- Date: Tue, 25 Jan 2005 10:38:10 +0000
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
| firstname.lastname@example.org | scintillating, many fauceted scarlet emerald..."
| (email@example.com) | --- Jim Theis, _The Eye of Argon_ (spelling
+- www.cowlark.com --+ original)