[lltx] code style
khaledhosny at eglug.org
Wed May 19 21:55:12 CEST 2010
On Wed, May 19, 2010 at 09:28:25PM +0930, Will Robertson wrote:
> On 19/05/2010, at 7:29 PM, Arthur Reutenauer wrote:
> >> 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.
> Well, that's the whole point -- once you're used to it, it's fine :)
> I don't have a huge objection to it and I can see how it's useful when you're re-using many many functions.
> But it's just a bit inconsistent when you've got expandpath (=kpse.expand_path) but then go and use kpse.expand_var in the same file. And it adds an extra line of code to the beginning of the script.
May be because the later was used just once, may be someone was
quickly experimenting and later forgot to do it the "standard" way, may
be just an oversight. The code is far from being well written anyway, and
I'm not particularly big fan of it.
Arabic localiser and member of Arabeyes.org team
Free font developer
More information about the lualatex-dev