lua-users home
lua-l archive

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


On 21 November 2013 22:32, Kevin Martin <kev82@khn.org.uk> wrote:
> 1) I'll never be able to remember which modules return tables, and which return a function

But that's not the kind of thing that'll go unnoticed for very long.

> 2) I can guarantee that at some point in the future, that module which currently only has one function will need another, and the rewrite will be horrific if not returning a table.

How so? It seems like a case of just changing:

    local fn = require "modname"

to:

    local t = require "modname"
    local fn = t.fn