[lltx] code style
wspr81 at gmail.com
Thu May 20 09:34:28 CEST 2010
On 19/05/2010, at 10:49 PM, Manuel Pégourié-Gonnard wrote:
> Another, more paranoid way of importing symbols in modules is to import them as
> locals, eg:
> local pairs, ipairs, format = pairs, ipairs, string.format
> Here the goal is not really to shoten names, but to keep a closer control about
> which symbols are available in the scope of the module, and avoid the above
> mentioned funny effect.
This looked interesting, especially after reading more about it in P.I.L., so I spent some time converting -nms to use this syntax.
It was a little more work than I bargained for, but in the end I really like how it forces you to be more strict about how data is being passed around between modules. The more I look into these modules it seems they're rather TeX-like in passing around large global variables everywhere.
Take a look:
Comments welcome. Would you be interested in trying this out in the master branch?
More information about the lualatex-dev