lua-users home
lua-l archive

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


On Wed, 31 Mar 2010 12:46:13 -0400
Javier Guerra Giraldez <javier@guerrag.com> wrote:

> On Wed, Mar 31, 2010 at 12:32 PM, steve donovan
> <steve.j.donovan@gmail.com> wrote:
> > On Wed, Mar 31, 2010 at 4:50 PM, Alex Queiroz <asandroq@gmail.com> wrote:
> >>     Kinda off-topic, but the following passage reminded me of the Lua
> >> community:
> >
> > This quote particularly:
> >
> > [[
> > Tcl's syntax is flexible enough that it's possible to write an OO
> > system in Tcl itself ....  Over the years, a number of such systems
> > have arisen, the most well-known being "Incr Tcl" ....  However, none
> > of these extensions was ever included with the standard Tcl
> > distribution or somehow "blessed" as the official OO system for Tcl.
> >
> > This meant that a newcomer to Tcl wishing to organize their code
> > according to OO principles had to pick a system to use from several
> > competing options.  And of course, newcomers are the least able to
> > judge a complex feature like that in a language, making it a doubly
> > stressful choice.
> > ]]
> >
> > That last para is exactly applicable to Lua.

Also, they do not know yet what would fit Lua better (say, a basic (light, simple, minimal) OO framework).
[I guess prototype-based, see also  below, fits Lua better, because (1) tables are like single composite objects (2) it's more basic (3) it's more general.]

> only if such newcomer feel that class-based inheritance is a requisite
> for "OO principles".  if all you want is encapsulation, polymorphism
> and nice syntax, then you don't need any of "several competing
> options".

Well, ones who prefer prototype-based (as I do) are left with building their own OO framework -- repeting the same construct for each new prototype, and possibly each new object.


Denis
________________________________

vit esse estrany ☣

spir.wikidot.com