ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: Concerning \installparameterhashhandler and family
Date: Wed, 10 Nov 2021 09:31:13 +0100	[thread overview]
Message-ID: <5388b2e1-1bde-257c-cdbc-ce94311af0f4@xs4all.nl> (raw)
In-Reply-To: <CAKyqqaavQEp=oym0Yp2T_6DL4jsAjQcBhpmt0+49odnd1wivrw@mail.gmail.com>

On 11/9/2021 8:01 PM, Jairo A. del Rio via ntg-context wrote:
> Hi. Reading at mult-aux.mkxl, I've seen command handlers define, among 
> others,  \installparameterhashhandler, However, in files such as those 
> related with symbol management, only \installparameterhandler and 
> \installsetuphandler are. When writing basic modules, sometimes only the 
> "raw" macros above are actually needed. So, what are "parameterset", 
> "hashhander", "rootparameterhandler", etc. for? Where would they ease 
> module writing? Thank you a lot and sorry for the long question.
The ones you mention are the lowest level ones and mechanisms that use 
them are oned that don't really have much to manage (like symbols and 
languages and fonts and so, these are core mechanisms on their own and 
need additional interfaces. There's also the matter of performance: 
anything key/value driven can have a performance hit so the more one 
wraps the worse it can get. (The mkii and mkiv/lmtx methods differe 
fundamentally, where in principle the mkii approach is faster but in 
practice mkiv/lmtx works out better. A typical case where usage in the 
end determines performance more than the implementation.)

For modules: don't go too low level. Not all helpers in modules like 
mult-aux are meant for usage outside well known situations. Just like 
some low level helpers in syst-aux stay around for compatibility.

In fact, one of the ideas behind luametatex/lmtx is to get rid of 
"complex" middle layers where the language itself can do it, so:

\protected\def\foo[#1]{\dosingleempty\dofoo}

\def\dofoo[#1]{...}

in mkii/mkiv can now be:

\tolerant\protected\def\foo[#1]{...}

(1) less code
(2) somewhat faster
(3) looks nicer (for me much is about looks)

but I guess that you already know that,

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2021-11-10  8:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09 19:01 Jairo A. del Rio via ntg-context
2021-11-10  8:31 ` Hans Hagen via ntg-context [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=5388b2e1-1bde-257c-cdbc-ce94311af0f4@xs4all.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).