lua-users home
lua-l archive

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


On Jan 14, 2008 1:04 PM, Ben <thebassplayer@gmail.com> wrote:
> That's why LOOP exists.  Just send people on over there

LOOP's greeting to the newbie:

"LOOP [..] is a set of packages for supporting different models of
object-oriented programming in the Lua language. [..] The models
provided by LOOP are not intended to define a standard for the Lua
language. Instead, they are examples [...]"

It then describes 5 different OO models. I think your hypothetical
newbie is going to go away more confused than ever. :)

BTW, never having seen the LOOP site before, I thought this statement
sounded a bit like a post-facto rationalization: "lack of a standard
object model avoids the use of a peculiar model instead of models
customized for particular needs, like simplicity, flexibility or
performance."

It seems to me that a built-in model wouldn't require you to choose,
because you could meet all those requirements at once. In particular,
a built-in solution wouldn't force you to choose between flexibility
and performance.

For instance, C++ inheritance can be as simple as 'struct Foo : Bar
{}', while at the same time allowing you to get progressively more
complicated (multiple inheritance, interface inheritance, access
control, etc.) without sacrificing performance.

I also have to agree that the lack of a built-in model does tend to
discourage OOP, at least at my workplace. If we're going to design our
APIs in an OO manner, someone needs to design (or choose) the class
mechanisms we will use. The path of least resistance is just to avoid
it altogether or to have numerous ad hoc mechanisms in use.

I'm not arguing that Lua should build-in support beyond the mechanisms
already in place, just that I can see where users like Fabian are
coming from.

Cheers,
Eric