lua-users home
lua-l archive

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


On Fri, Sep 28, 2012 at 11:13 AM, Rena <hyperhacker@gmail.com> wrote:
> any means of implementing it other than as a patch to the standard library
> end up outweighing the benefits.

I would agree with that. And if we're patching then we might as well
remove all the extra keystrokes and violations of "don't repeat
yourself' and go for:

import bread, butter, jelly

with the understanding that these tables are injected as locals. This
can't be done with a library, and this isn't the first time this
syntax suggestion has been made.  But the Lua philosophy is to keep
the syntactical sugar down as much as possible, which is a good design
goal because we could end up with a lot of special case syntax and
corresponding reserved words.

This is something where an intelligent macro processor can be used,
and although I've committed a few of those things, I'm no longer sure
that adding the extra complex dependencies to a project is worth the
convenience.  So for instance, I've mostly used LuaMacro as an
intelligent C preprocessor (e.g. winapi source) and would never make
it a dependency for one of my Lua projects, since I prefer to keep the
barrier for re-use as low as possible.

steve d.