lua-users home
lua-l archive

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


2017-03-13 18:59 GMT+02:00 Coda Highland <chighland@gmail.com>:
> I think there's a reasonable argument for
> local a, b, c, d =
>       e, f, g, h
>
> This gives you some level of alignment between value and variable that
> one-lining it doesn't, while being more compact than a series of
> one-variable assignments.

I do something like this for caching functions from loaded modules.
(Looks better in fixed-width font.)

local trim,  intowords,  paragraphs,  concat,  decat,  condense,  weights
  = U.trim,U.intowords,U.paragraphs,U.concat,U.decat,U.condense,U.weights