LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

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

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

Print Reply
Lars Hellström <[log in to unmask]>
Mon, 14 Apr 2014 15:30:29 +0200
text/plain (26 lines)
I just noticed another point where the expl3 naming rules doesn't say what 
to do: what if I have a variable that is also a function? In traditional 
imperative languages those may seem like exclusive categories, but in 
(La)TeX programming it is sometimes perfectly natural, and quite 

The typical example of this would be a callback function: something that a 
module calls at specified points, but which the user of that module is 
expected to define. Treating this as just a function loses the specification 
of the scope for that variable. Treating it as a variable of type tl loses 
the specification that it takes arguments. What I found natural is to use a 
name of the form




This could be interpreted both as adding a SCOPE part to function names (the 
vast majority of functions without a SCOPE are implicity considered to be c_ 
constant), or alternatively as proclaiming any :<ARG-SPEC> to be a valid 
_<TYPE> for a variable.

Lars Hellström