On 1/19/2024 9:26 AM, Shiv Shankar Dayal wrote:
Dear Hans,
I saw the C code of LuaMetaTeX and I saw a lot of gotos which is not good coding practice. These potions of code which have goto should be refactored.
I am a C programmer, but I know very little of TeX. If you can point me towards where should I start for TeX(perhaps TeX Book or TeX for the Impatient), I can help with refactoring of code to make is more efficient/easier. Luametatex evolves out of traditional tex so we have/keep some and although i grew up in the 'anti goto' times (pascal) there are plenty cases where i see no problem. Occasionaly I clean up such bits (when it makes sense). And I'm not going to enter coding practice discussions.
Forget about refactoring ... there has already be done a lot of that and we want to stay sort of close to the original (also due to doicumentation). I know the code quite wel now and refactoring is for me counter productive. These are projects running for decades and engines need to be stable so changes come slow. You can compare the luanmetatex source to luatex and pdftex to see how we proiceed. 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 -----------------------------------------------------------------