[lltx] code style

luigi scarso luigi.scarso at gmail.com
Wed May 19 14:12:18 CEST 2010


On Wed, May 19, 2010 at 11:59 AM, Elie Roux
<elie.roux at telecom-bretagne.eu> wrote:
> Will Robertson a écrit :
>>
>> local splitpath, expandpath = file.split_path, kpse.expand_path
>> local gsub, match, rpadd    = string.gsub, string.match, string.rpadd
>>
>> and so on? It makes the code typed shorter, yes, but I've found it harder
>> to read because I haven't known the context of the functions. Is this a
>> regular kind of thing in Lua programming?
>>
>
> It makes these functions accessed faster too. Actually this is a ConTeXt
> programming style, we just took it from there, and fully trust Hans for
> doing these kind of things right.
>
>> Also, four spaces for indenting? Again, is this standard?
>>
>
> Spaces for indenting is maybe something we don't want to discuss... it has a
> decades-past of flame wars behind it... let's keep with spaces for
> indenting...
>
> Thank you,
> --
> Elie
>


Lua code from ConTeXt minimals *mkiv files is almost indistinguishable
from ordinary Lua code
and can (and should be, in my opinion) used as example.
Hans's style (aka ConTeXt style) is clearly expressed by   TeX macros
in *tex and *mkii files .



PS
forgive me Elie, but I  have made a mistake with the first email .



-- 
luigi



More information about the lualatex-dev mailing list