LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mailing list for the LaTeX3 project <[log in to unmask]>
Tue, 12 Oct 2004 22:36:21 +0200
Mailing list for the LaTeX3 project <[log in to unmask]>
text/plain; charset=us-ascii
Frank Mittelbach <[log in to unmask]>
text/plain (70 lines)

 > When reading the docs on the new naming conventions,
 > I thought about the following:
 > Will the rules be general enough to cope with most future
 > situations? I fear that a lot of macros (especially internal
 > macros) will fall in the :w category which will make the
 > convention less informative.

in my experience this is not a problem.

the strength of the expl3 conventions are in

 - clear separation of global and local variables and their global and local
   mutators in the various modules

 - the strength of the exp module, e.g. the fact that many of the expansion
   tricks that typically a TeX source vanish, e.g.

   \let:NN \foo \bar        let one token to another token

   \let:cc {foo-#1}{bar-#2} let two tokens both generated from strings ->
                            csnames to each other

   normal LaTeX coding for the latter would be:

    \expandafter\let\csname foo-#1\expandafter\endcsname
                    \csname bar-#2\endcsname

  and all that with full generality, eg to get only the second argument as a
  csname generated we need the declaration

   \def_new:Npn \let:Nc {\exp_args:NNc \let:NN}

  and then \let:Nc \foo {foo-#1} works etc.

all that makes codes enormously more readable.

now how often do you need :w commands?

if you look at the low-level module code that comes with expl3 itself or if
you think about parsing applications like xkeyval one might get the impression
that this happens very often but in any other circumstances the number is very
very low indeed.

my (not quite finished) conversion of the xor package has used on 9 lines some
:w macros  (all of which are actually fixes to expl3 code) and the whole
package has current 7947 code lines (excluding documentation)

template.sty (in the converted version) has 26 left out of 526 code lines most
of which are stuff like

\exp_after:NN \show \cs:w ... \cs_end:

where simply the functionality in epxl3 is missing ,ie where the correction
form would be something like

 \cs_show:N      ( = \show)

and the above would then turn into

 \cs_show:c {...}

so all in all my experience is that this is only really used in the very
low-level modules that set up data structures like queues and those that deal
with special parsing of special input syntax