[lltx] code style

Elie Roux elie.roux at telecom-bretagne.eu
Wed May 19 11:59:13 CEST 2010


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


More information about the lualatex-dev mailing list