[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Cryptic OOP syntax
- From: PA <petite.abeille@...>
- Date: Thu, 27 Jan 2005 10:47:54 +0100
On Jan 27, 2005, at 04:09, Mike Pall wrote:
So IMHO instead of discussing everyone's favourite OOP style and what
kind of syntactic sugar is needed to support it, I suggest collecting
and categorizing the needed changes to the core. Then invent a good
meta-mechanism that covers most of these cases (and maybe some more)
and implement it.
I wholeheartedly concur with Mike's "State of the Union" address :)
Lua is just fine as it is right now.
With a touch of creativity, one can shape Lua in any forms one wants
to. I personally don't feel the need for any additional syntactical
sugar of any sort to achieve my own devious OOP needs and wants.
At the moment, I'm quite happy simply using a combination of technics
highlighted by Roberto in Chapter 15.2 and 16.4 of Programming in Lua.
That, in addition to a minimal set of organization principals, gives me
everything I need from an OOP standpoint: class and instance methods,
proper inheritance as well as full encapsulation.
Of course, it would be nice to "formalize" the above packaging
conventions one way or another, if only for my own convenience sake.
But this doesn't necessarily imply changing anything in Lua itself. At
the moment, I'm more looking toward integrating something like LuaLint
in my "build" process to automatically check, validate and enforce my
own made up OOP conventions in addition to Lua's core syntax itself.
In summary, Lua, "as is", greatly satisfies for my deviant OOP
And now lets all sing along 8^)