Received: from mx0.gmx.net (mx0.gmx.net [213.165.64.100]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with SMTP id q8DC6vsm015840 for ; Thu, 13 Sep 2012 14:06:58 +0200 Received: (qmail 22830 invoked by alias); 13 Sep 2012 12:06:51 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 13 Sep 2012 12:06:51 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx044) with SMTP; 13 Sep 2012 14:06:51 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q8DC4R9Q021664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Sep 2012 14:04:27 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.1) with ESMTP id q8DBIO5F007582; Thu, 13 Sep 2012 14:04:27 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 3092572 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 13 Sep 2012 14:04:26 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.1) with ESMTP id q8DC4QIn022998 for ; Thu, 13 Sep 2012 14:04:26 +0200 Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id q8DC4Gdo021577 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 13 Sep 2012 14:04:19 +0200 Received: by vbbfo1 with SMTP id fo1so1669517vbb.22 for ; Thu, 13 Sep 2012 05:04:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.175.193 with SMTP id cc1mr902285vdc.61.1347537856087; Thu, 13 Sep 2012 05:04:16 -0700 (PDT) Received: by 10.220.112.145 with HTTP; Thu, 13 Sep 2012 05:04:16 -0700 (PDT) References: <505141C9.60900@gmail.com> <50518513.30208@latex-project.org> <50518B69.7050005@morningstar2.co.uk> Content-Type: text/plain; charset=ISO-8859-1 Message-ID: Date: Thu, 13 Sep 2012 14:04:16 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: New auxiliary functions guidelines To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <50518B69.7050005@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (BackTrace mail analyze); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnGL2vqOgpaBYL16oitsMrgDt/NQNpSCZFFjDOy 97xb7Zpf+wZnd5ZXNcvLDXR3Wg3wRjdQbwEMh8=V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de Status: R X-Status: X-Keywords: X-UID: 7153 On 9/13/12, Joseph Wright wrote: > On 13/09/2012 08:02, Frank Mittelbach wrote: >> Am 13.09.2012 04:15, schrieb Joel C. Salomon: >>> The use of `\@@_function:nn` implies that the initial function is itself >>> an internal one. Sometime that will be the case, of course, but I think >>> `\pkg_function:nn` would make a better primary. >>> >>> (Thinking aloud: Unless the intention is that `\pkg_function:nn` is the >>> primary and `\@@_function:nn` ==> `\__pkg_function:nn` is the first >>> auxiliary? but then you'd have said that.) >> >> I think you are right and the intention is not yet properly described. >> My nomenclature would be something like this: >> >> \pkg_function:... >> >> is an interface function of the package to the outside world, eg what >> other packages should use and should be able to rely on. >> >> \__pkg_function:... aka \@@_function:... for short >> >> is an "internal" package function that is used within the package but >> shouldn't be used outside and its implementation and semantics are not >> to be relied on by anybody >> >> Now sometimes one has a need for helper functions that are only be used >> once to implement an internal function, typically when doing some >> complicated token parsing. Those functions are the one we call >> "auxiliary" functions and if they are needed they get the string "_aux" >> in the name. >> >> So >> >> \@@_function:... is the internal one >> \@@_function_aux:... is used to implement just the \@@_function:... >> >> if more than one "auxiliary is needed for implementing a single function >> then either they are distinguished by the arg signature or by "_auxi" >> "_auxii" etc. >> >> >> point is that the "_aux" are intended to help just with a *single* >> command implementation. If it turns out that one reuses an "_aux" >> function several times, it would be better to give it a separate >> descriptive name and make it an internal function and not an auxiliary. > > Do you want to revise this or shall I? > >> perhaps I should also mention that (though not that likely) you may also >> have the situation that an interface function needs an auxiliary, eg >> >> \pkg_function:... >> \@@_function_aux:... > > > Unlikely, as this should be covered by > > \pkg_function:... > \__pkg_function_aux:... Joseph, you are saying the same as Frank. Do you mean \__pkg_function:...? This is what we had done so far, avoiding _aux unless it was really necessary. I guess that including aux for all auxiliaries used in a single function is best (so we'd need to change the names of a bunch of auxiliaries in l3kernel). Bruno