lua-users home
lua-l archive

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

On Thu, Jun 10, 2010 at 4:55 PM, Warlich, Christof
<> wrote:
> Can you give an example why this may lead to a better (i.e. OOP) style?
> I mean, the table is global, so why is it a good idea to pass it to the function?

Well, it does not have to be global with this kind of style, which may
be a desirable thing.

For a truly global table, then most of the problem goes away anyway,
since the reference in the function happens later, after the table

steve d.