lua-users home
lua-l archive

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

> But equally, if you're a developer using the code, you can (and
> should) ask questions and report bugs when the documentation doesn't
> match the code, or seems to be erroneous or incomplete. (This doesn't
> really help much with luaposix, where there's no documentation,
> admittedly.)

Indeed, just sometimes some details are considered so self-evident,
nobody considered it to be worth of documentation. Don't ask me for a
good example.Maybe I can come up later.

> How does it give you any more flexibility than any other solution
> exposing the same API?

Well any solution does that, that makes a clear distinction between
core and API. Having a set of functions as intermediaries just makes
it easy to change the core and the intermediaries while keeping the
API the same. If you throw around objects with internals and APIs
mixed, its not easy to spot API changes.

Having the metatable as storage place for internals of the handlers is
just as good. Probably better performance than the weak table. I also
don't want to diss any other solution, just one example how I solved
that question.