[luatex] asking for style/code critique

Hans Hagen j.hagen at xs4all.nl
Sun Dec 18 21:20:55 CET 2022


On 12/18/2022 8:58 PM, Werner LEMBERG wrote:

> attached is my first serious attempt to write a 'hyphenate' callback
> (to be used for LilyPond's Texinfo documentation).  It is actually my
> first Lua program ever.  Fortunately, initial tests indicate that it
> works aas expected :-)
> 
> Please have a quick look and check whether you can see any big
> problems – mainly stylewise (besides using two spaces for indentation
> instead of three) but perhaps codewise, too.
it's not my habit to comment publicly on coding styles so i limit myself 
to suggesting to make your shorthands local, so

local DISC = node.id("disc")

just to avoid a clash with someone elses code

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the luatex mailing list.