LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Classic View Use Monospaced Font Show Text Part by Default Condense Mail Headers Topic: [<< First] [< Prev] [Next >] [Last >>]

 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 Date: Fri, 12 Sep 2008 13:49:41 +0200 Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]> Subject: Re: def:NNn --- was tlp type From: Morten Høgholm <[log in to unmask]> Content-Transfer-Encoding: 7bit In-Reply-To: <[log in to unmask]> MIME-Version: 1.0 Sender: Mailing list for the LaTeX3 project <[log in to unmask]> Parts/Attachments: text/plain (33 lines) On Tue, 09 Sep 2008 18:04:48 +0200, Mittelbach, Frank wrote: > my take is that the recent addition of \def:NNn and firends was already > a mistake and should be reverted. These functions provide something > which at the expl3 level isn't really needed. What is gained from having > the alternative between > > \def:Npn #1#2#3 {...} > > and > > \def:NNn 3 {...} > > the former is much more general (and on expl3 level that generality is > sometimes needed), I would claim it is easier to read as the # signs > stand out better than a simple "3". The primary reason these were added was for template, xparse, l3messages (I think) and others definining functions with a #1#2#3... preamble but where the number of arguments is either specified directly as a number (template) or calculated (xparse). template used \newcommand internally while xparse built its parameter specification manually. I always saw the p specifier somehow connected to w. The mapping certainly goes one way: If you need a function with w specifier, then a primitive TeX parameter specification is called for. The other way can be argued. In most cases however, what you want is a specific number of arguments and I was trying to work in that direction. Also, this was a way to provide for a better (well, at least different) error message than what TeX states. -- Morten