[lltx] code style

Arthur Reutenauer arthur.reutenauer at normalesup.org
Wed May 19 11:59:48 CEST 2010


> local splitpath, expandpath = file.split_path, kpse.expand_path
> local gsub, match, rpadd    = string.gsub, string.match, string.rpadd

  It's not obfuscation, it's Hans' style :-)  I'm not a big fan either,
but I got used to it, reading ConTeXt's Lua source code.

  I think I've seen it under Roberto's pen in _Programming in Lua_ but
can't be sure.

> Also, four spaces for indenting? Again, is this standard?

  This is K&R, Will!  I think they used four spaces for a single indent,
and a eight-space tab for a double indent (and so on); I personally like
it better than a full eight-space tab because you can have more levels
of indentation ;-)  At work we're even using two-space indents (well,
I'm the only one respecting the house style so *I* use a two-space
indent and I've come to like it best).

	Arthur


More information about the lualatex-dev mailing list