lua-users home
lua-l archive

Re: Suggestion for 5.3: import() for creating a "slew" of locals

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


2013年11月17日 Dirk Laurie <dirk.laurie@gmail.com>:
> What we should rather be looking for, is something with much
> wider application that happens to be a convenient way of also
> implementing this feature.
What about token filters? Detect token "import", assert next token is
a constant string, call require with the string, generate tokens for
locals as appropriate, for each member of the module in
package.loaded[the string] (and eventually the module itself).
My vote reads "+1 for token filters in 5.3", but thankfully this is
not a democracy.

AltStyle によって変換されたページ (->オリジナル) /