lua-users home
lua-l archive

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


On Jan 14, 2008 6:03 PM, Javier Guerra Giraldez <javier@guerrag.com> wrote:
> third point: if you use inheritance, you've already chosen one

No, you haven't. You've chosen the scheme *you* are going to use, for
*your* class(es). If you decide you want something fairly
sophisticated, while remaining fast, you might have a considerable
amount of code supporting your scheme (see LOOP). I find the idea of
10 programmers contributing ten different OO schemes to a project,
with 10 copies of similar yet incompatible code, to be distasteful
(apparently you have different tastes). The only way to avoid that is
to decide, collectively, on a scheme you're all going to use, so at
the very least you can share the code that implements that scheme. In
our case, at least, it's easier to just not go there.

Again (for, what, the third time now?), I'm not saying this is an
insurmountable problem, that it represents a flaw in Lua, or anything
of the sort. I'm just saying *it exists*. But apparently this is a
religious issue.

On Jan 14, 2008 8:46 PM, David Haley <dchaley@gmail.com> wrote:
> On the (perhaps infrequent) cases where you need actual implementation
> inheritance, you can do it by adopting some appropriate policy.

But you needn't adopt a policy at all! Just implement it any old way!
Hell, choose something different for every class! Why not? Who cares
if somebody already has a different scheme in the code base? We don't
care about code size! We don't mind reinventing the wheel 15 times in
the same project! Ahhhh... never mind.

Cheers,
Eric