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:
Will Robertson <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Fri, 7 Nov 2008 10:47:17 +1030
Content-Type:
text/plain
Parts/Attachments:
text/plain (63 lines)
Hi Morten,

Thanks for the thoughtful and detailed reply! I now believe that  
everything you do is well-considered and always correct :)

On 07/11/2008, at 2:00 AM, Morten Høgholm wrote:

> General remark: Almost all of the kernel ought to be "long".

I guess this was the philosophy in LaTeX's \newcommand, and your  
argument is hard to disagree with. Let's come back to this at a later  
date.

> It doesn't need it, it's just the matter of how early on the expansion
> module is defined and utilized.

Ah, yes. So you an only use \exp_args:Nc IFF the code that uses it is  
not expanded in any context before the l3expand module is loaded. I  
guess we need to be careful of that in general, but in this particular  
case I think we're okay.

> If the functions are non-protected, they will perform argument  
> expansion
> as usual and then stop once \let:NN is met.

That also sounds very sensible. In fact, this sounds like it should be  
a general rule.

***

With the above discussion in mind, I think, then, that it makes sense  
that \let_new:NN and its variants are only defined with \def_new --  
you don't want the protection so that \chk_if_new_cs:N kicks in at the  
right time, and the \par issue won't be a problem because that will  
never not be new. Only the other hand, you never know what you're  
going to get so maybe they should be long "just in case". What do you  
think?

***

I think \glet:NN and its variants now need some attention. I propose  
changing

-\def_protected_new:Npn \glet:NN {\pref_global:D \let:NN}
-\def_protected_new:Npn \glet:Nc {\exp_args:NNc \glet:NN}
-\def_protected_new:Npn \glet:cN {\exp_args:Nc \glet:NN}
-\def_new:Npn \glet:cc {\exp_args:Ncc \glet:NN}

to

+\def_protected_long_new:Npn \glet:NN { \pref_global:D  \let:NN }
+\def_new:Npn                \glet:Nc { \exp_args:NNc  \glet:NN }
+\def_new:Npn                \glet:cN { \exp_args:Nc   \glet:NN }
+\def_new:Npn                \glet:cc { \exp_args:Ncc  \glet:NN }

for the same reasons as you've outlined above for plain old \let:NN. I  
haven't missed something again, have I?

***

Many thanks,
Will

ATOM RSS1 RSS2