ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: LuaMetaTeX code
Date: Fri, 19 Jan 2024 09:57:49 +0100	[thread overview]
Message-ID: <93ceadaf-6573-45ae-b0a4-62a79121684f@xs4all.nl> (raw)
In-Reply-To: <CALJ_jGQg-Xu2hXNiFpExCMQt-KUXGUMrcajEZJ_ssBLr7Yw7uw@mail.gmail.com>

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 Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl

If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net

  parent reply	other threads:[~2024-01-19  9:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19  8:26 [NTG-context] " Shiv Shankar Dayal
2024-01-19  8:31 ` [NTG-context] " Shiv Shankar Dayal
2024-01-19  8:39   ` Taco Hoekwater
2024-01-19  8:43     ` Shiv Shankar Dayal
2024-01-19  9:01   ` Hans Hagen
2024-01-19  8:57 ` Hans Hagen [this message]
2024-01-19  9:11 ` Henri Menke via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93ceadaf-6573-45ae-b0a4-62a79121684f@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).