* Table "modules"
@ 2018-10-28 16:06 Joseph Wright
2018-10-28 18:05 ` Hans Hagen
2018-10-29 15:05 ` Joseph Wright
0 siblings, 2 replies; 4+ messages in thread
From: Joseph Wright @ 2018-10-28 16:06 UTC (permalink / raw)
To: ntg-context
Hello all,
Looking at management of global Lua tables (for the obvious cases ...),
I notice that all of the core Mk IV files use the construct
if not modules then modules = { } end
modules["<file-name"] = { -- meta-data here
From a ConTeXt point-of-view, is it acceptable for third-parties to use
this construct, or is it 'ConTeXt maintainers only'? I'm wondering for
code used generically: it would be good to use the same approach, but I
don't want to tread on any reserved namespaces.
Joseph
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Table "modules"
2018-10-28 16:06 Table "modules" Joseph Wright
@ 2018-10-28 18:05 ` Hans Hagen
2018-10-29 15:05 ` Joseph Wright
1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2018-10-28 18:05 UTC (permalink / raw)
To: Joseph Wright, mailing list for ConTeXt users
On 10/28/2018 5:06 PM, Joseph Wright wrote:
> Hello all,
>
> Looking at management of global Lua tables (for the obvious cases ...),
> I notice that all of the core Mk IV files use the construct
>
> if not modules then modules = { } end
> modules["<file-name"] = { -- meta-data here
>
> From a ConTeXt point-of-view, is it acceptable for third-parties to use
> this construct, or is it 'ConTeXt maintainers only'? I'm wondering for
> code used generically: it would be good to use the same approach, but I
> don't want to tread on any reserved namespaces.
Hard to say ... the only generic code is the fontloader and the only
check done there is the toplevel 'context' table, so there is not much
change on a clash I guess. We can hardly claim a namespace, but now at
least it's possible to see if something is meant for context (and
originates on context, fwiw).
Anyway, I don't expect much generic code to show up. One problem I see
is that currently, as context uses that namespace, there are no
duplicates. So, it being used more general, probably means that I need
to add a mechanism that will refuse to (over)load code, but even then i
cannot oversee implications ... For latex you can consider
'latexmodules' ... up to you. It's too late now to change it to
contextmodules.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Table "modules"
2018-10-28 16:06 Table "modules" Joseph Wright
2018-10-28 18:05 ` Hans Hagen
@ 2018-10-29 15:05 ` Joseph Wright
2018-10-30 2:17 ` Aditya Mahajan
1 sibling, 1 reply; 4+ messages in thread
From: Joseph Wright @ 2018-10-29 15:05 UTC (permalink / raw)
To: ntg-context
On 28/10/2018 16:06, Joseph Wright wrote:
> Hello all,
>
> Looking at management of global Lua tables (for the obvious cases ...),
> I notice that all of the core Mk IV files use the construct
>
> if not modules then modules = { } end
> modules["<file-name"] = { -- meta-data here
>
> From a ConTeXt point-of-view, is it acceptable for third-parties to use
> this construct, or is it 'ConTeXt maintainers only'? I'm wondering for
> code used generically: it would be good to use the same approach, but I
> don't want to tread on any reserved namespaces.
>
> Joseph
Somehow I've managed to loose Hans' reply, but I've seen it in the
archive :)
Hans: Thanks for the quick reply. I'll suggest to the LaTeX team that we
treat table modules as ConTeXt-specific/reserved, and will think of a
different name.
Joseph
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-30 2:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-28 16:06 Table "modules" Joseph Wright
2018-10-28 18:05 ` Hans Hagen
2018-10-29 15:05 ` Joseph Wright
2018-10-30 2:17 ` Aditya Mahajan
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).