LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
Frank Mittelbach <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Mon, 15 Feb 2010 12:47:06 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
Philipp Stephani writes:

 > - the scratch variables have already been mentioned in another thread. I
 > - think that a few scratch variables guaranteed not to be touched by the
 > - kernel are useful, if combined with a warning like "The kernel defines
 > - the following scratch variables: ... They are guaranteed to never be used
 > - by the kernel. However, calling other packages' macros might affect them
 > - since they are shared by all packages. So you must not rely on these
 > - variables being unaltered when calling macros that are not defined by the
 > - kernel. In the latter case, use your own private variables. As an
 > - example, a package `foo' might define private scratch variables
 > - `\l_foo_tmpa_tl' and so on."

on the whole I think we should abandom general purpose scratch registers as
they are never ever safe

so I propose

 we use kernel only scratch registers/tls that we document as "do not use in
 your own code" - that should have been the case in the first place really, we
 already did that for 2e, no idea why that got forgotten/changed

In addition we can either totally drop the scratch registers or keep those
already in use typically, but clearly document that it is safer not to use
such things but instead use some that are local to the package, eg
\l_foo_tmpa_tl as otherwise one can't make any assumptions on their content.

In theory I would be for dropping them completely, however, people will use
such fine names as \l_tmpa_tl if only because they always did so in the past,
so it might be better to keep them, but better document the restrictions
coming with them.

frank

ATOM RSS1 RSS2