latex3 add tag
user 3.14159
I am a bit mystified by all the `\ExplSyntaxOn ... \ExplSyntaxOff` codes that appear all over the place, and have a couple of questions related to this.

1. Where can one get a basic introduction in the concepts, syntax and purpose?
2. What is the ultimate purpose of this? If this is to make the usual syntax obsolete, why?
3. How is the performance of this compared to more basic commands?
4. Are some of the things settled by now? What I mean is are there some parts that did not change in the last couple of years, and are guaranteed not to change in the future. In other words, are there packages and/or methods that can be used for publications that go to the arXiv with the guarantee that this can get compiled there, and if someone downloads this in 10 years from now, it will then still run through on an up-to-date LaTeX installation?
5. Are there any concerns that this development may eventually hurt LaTeX in the sense that users who use LaTeX but are not really into coding may no longer be able to fix their own codes, and that these users may switch to other typesetting systems?
Top Answer
Skillmon
I don't really consider myself an expert in this field, but at least I did some
`expl3` coding myself in some of my packages, so I might be able to get you
started.

1. The document `texdoc expl3` (`expl3.pdf`) gives an introduction to LaTeX3 on
   16 pages. Described are:

    - The layers of LaTeX3 (some of which might not be fully implemented). The
      basic concept is that there should be different languages to achieve
      different things. Programming is done in the programmer layer which is the
      `expl3`-syntax. Atop that programmer layer there should be a designer
      layer, which is implemented in `expl3`, but the language used there will
      most likely not be `expl3` (to be seen, as far as I know). And the
      user-facing layer is the document mark-up.
    
    - The naming conventions/scheme used in `expl3`'s programmer's layer.
    
    - The LaTeX3 approach to expansion. There shouldn't be many `\expandafter`s
      (which's equivalent in `expl3` is `\exp_after:wN`) but instead we use
      special function variants that expand their argument. Of course, this is
      internally implemented using `\exp_after:wN`, but this makes code much
      more readable, compare:
        ```
        \exp_after:wN \tl_set:Nn \exp_after:wN \l_tmpa_tl \exp_after:wN { \l_tmpb_tl }
        \tl_set:No \l_tmpa_tl { \l_tmpb_tl }
        ```
        Both lines do the same, but the second is much easier to read.
        
    - The distributions components and a bit about stability (I'll get back to
      that later)
    
    - Notes for people writing code for LaTeX2ε using the currently available
      LaTeX3 facilities.
    
    - Loadtime options of the `expl3` package
    
    - Usage of `expl3` in other formats than LaTeX2ε

    - Requirements

2. This might be best suited to be answered by Frank Mittelbach or Joseph
   Wright, but here are my 2 cents: The ultimate purpose is to create a new
   format, which will be called LaTeX3. LaTeX3 aims to be split up in more parts
   than LaTeX2ε with a more sensible distinction between different tasks. The
   result will be a clean programming language for the internal stuff, a design
   language to define how document elements will be formatted, and a language to
   mark-up documents, which might not differ from LaTeX2ε's document mark-up at
   all or just in some aspects, but (to my knowledge) this isn't completely
   worked out yet. So this will make the usual programming syntax of LaTeX2ε and
   its internal macros obsolete, but most likely not the document mark-up
   syntax.

3. The code focuses on stability over performance, so the performance might not
   always be top-notch. That being said, LaTeX3 still has the fastest
   space-stripping code I know of and most likely in other parts is pretty
   optimized as well. There are some aspects of it that can be made much faster,
   and means to do so are evaluated by the team, but speed gain shouldn't affect
   stability and predictability (they want document-level code to have
   predictable outcome in the code-layer, e.g., macros created with `xparse`'s
   `\NewDocumentCommand` always expands to the same structure, even if it might
   be faster to just expand to the code if they don't grab arguments -- but they
   have a branch that shortcuts in cases like this to make the overhead
   smaller). All in all the performance isn't too bad, compared to what the code
   does, after all they implemented something coming close to a general purpose
   language in TeX, imho.

4. The code loaded by `\usepackage{expl3}` is pretty stable. There might be
   internal changes in the future, but functions documented in
   `texdoc interface3` (`interface3.pdf`) can be considered stable and should
   work in years, too. There are experimental functions and modules, but those
   are contained in `l3experimental` (`l3benchmark.sty` is one of those packages
   for example). To give you an idea, `\ExplSyntaxOn` and `\ExplSyntaxOff` were
   last changed in 2011, some functions were not changed in ages, some were
   added kind of recently. In `interface3.pdf` functions added recently (meaning
   in this millennium) or changed are marked containing the date of the last
   change. Citing from `expl3.pdf`:

   > Wile `expl3` is still experimental, the bundle is now regarded as broadly
   > stable. The syntax conventions and functions provided are now ready for
   > wider use. There may still be changes to some functions, but these will be
   > minor when compared to the scope of `expl3`.
   >
   > New modules will be added to the distributed version of `expl3` as they
   > reach maturity. At present, the `expl3` bundle consists of a number of
   > modules, most of which are loaded by including the line:
   >
   > `\RequirePackage{expl3}`
   >
   > in a LaTeX2ε package, class or other file. The `expl3` modules regarded as
   > stable, and therefore suitable for basing real code on, are as follows:
   >
   > `l3basics`, `l3box`, `l3clist`, `l3coffins`, `l3expan`, `l3int`, `l3keys`,
   > `l3msg`, `l3names`, `l3prg`, `l3prop`, `l3quark`, `l3seq`, `l3skip`,
   > `l3tl`, `l3token`

   I've changed the layout of that list to remove the scope of the modules.

5. The assumption that users can fix their own codes I'd consider bold.
   Nevertheless I'd say no. The aim of all this is to get a stable and solid
   platform on which designers and document authors can build. The average user
   can't code in LaTeX2ε's internal level, and the internals of LaTeX2ε are
   pretty obfuscated by `\v@w@lr@pl@c@m@nt` (vowel replacement) and the
   inconsistent usage of `@`. That's going to turn a lot better with `expl3`,
   but users need to learn the new conventions if they want to grasp the meaning
   of code. But I'd personally say that these conventions are easy to understand
   and understanding `expl3` code is much easier than LaTeX2ε code once you're
   accustomed to it (this is coming from someone who codes more in (La)TeX than
   he writes documents with it, so I think I know what I'm saying here). Note
   that with `expl3` code I don't mean the inner workings of `expl3` functions,
   but the outcome of the used functions.

There is a not so short video on youtube from TUG conference 2011 of a speech given by Frank Mittelbach about the architecture of LaTeX3: https://www.youtube.com/watch?v=-lr6KEPGLDs

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.