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 p05Mv3IK028455 for ; Wed, 5 Jan 2011 23:57:06 +0100 Received: (qmail 15950 invoked by alias); 5 Jan 2011 22:56:58 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 05 Jan 2011 22:56:58 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx077) with SMTP; 05 Jan 2011 23:56:58 +0100 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p05Mt7GO009203 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Jan 2011 23:55:08 +0100 Received: from listserv.uni-heidelberg.de (localhost.localdomain [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p05J3ucg002376; Wed, 5 Jan 2011 23:55:06 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 816127 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Wed, 5 Jan 2011 23:55:06 +0100 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p05Mt5CA032190 for ; Wed, 5 Jan 2011 23:55:05 +0100 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p05Mt1IT006147 for ; Wed, 5 Jan 2011 23:55:05 +0100 Received: from morse.mittelbach-online.de (p3EE3E037.dip.t-dialin.net [62.227.224.55]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LwXB1-1QOgO20ix5-017nBy; Wed, 05 Jan 2011 23:55:01 +0100 Received: by morse.mittelbach-online.de (Postfix, from userid 501) id 56CC87227B; Wed, 5 Jan 2011 23:54:58 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <4D20D031.7040803@gmx.de> <4D20DAE9.3070306@morningstar2.co.uk> <4D21D4CA.70703@morningstar2.co.uk> <2F1A4A24-7C35-4C2A-8E80-115DCD9510DF@YAHOO.DE> <4D21F6CE.10504@morningstar2.co.uk> X-Mailer: VM 7.19 under Emacs 21.3.1 X-Provags-ID: V02:K0:8GaguQsWLAZs6uJuxVZpPtXDVMyXaDND28XOQeMAm22 uyYRaQpQz3NfjwPsuiuVs+DEN6Zuq7ZwCDbLXnZ5SIxO/sqMFJ 5R0Fp92+rIpBdo9YX+453TgPCvO504jJHzvtVuEnTcjIKRKkiw N0XgMTux2gSSDFe5vhPbNayhepmj3xdFQIonLGGhc5+wF3CNnx vYjjOMyVvQdLNXzkiwedQ== X-Spam-Whitelist-Provider: Message-ID: <19748.63170.237158.614517@morse.mittelbach-online.de> Date: Wed, 5 Jan 2011 23:54:58 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Frank Mittelbach Subject: Re: \int_eval:n versus \dim_eval:n/skip_eval:n [was Re: l3luatex module] To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4D21F6CE.10504@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p77e5KAPs1l6v/Sb97LojnDtMgfETrECMLUO9erHzOJe+OynZRhvlGqb5A0X bbiCt2rAnnct/NAlbHMvoAL6GY+23tB3khNK7bp7qqSbssdDTHsQd8+gWzfjr4OMj5ambWQGofKK 3vIsQ==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: 6526 somehow it looks as if I haven't got Philipp's original mail. was that not send to latex-l? anway ... Joseph Wright writes: > On 03/01/2011 15:03, Philipp Stephani wrote: > > There should be no places where \int_eval:n is actually needed if you > > stick to pure L3 > > Well, that's not really true: there are at least two cases where you do. Joseph gave a bunch of examples, but in general you also have the point of bootstrapping to consider. Clearly \int_eval:n wouldn't be a command for arbitrary use, but you need as part of setting up the inner kernel commands and you need it in modules that provide new type or provide conversion from some datastructure to some other. What can be argued is: is it so low-level that nobody outside the kernel should use it? I don't think so, but it is certainly true that in package code you would normally not need it. > > [1] maybe the function should even be called \int_eval:x? > > I'd noticed a while ago that all of the int/dim/skip functions look a > bit like 'x' expansion. There are a few odd 'x' type functions, but in > general they should be \edef-like in expansion. This means that > \protected macros should not expand inside 'x' expansion. However, they > are expanded by \numexpr, etc. So 'x' seems inappropriate here to me. It would be inappropriate for the reason you give. But also for another one. I sure have changed my mind several times about how to think about :nox argument specs. but these days I'm fairly convinced that one should without execption think of them (and describe them) as manipulating the arguments prior to passing them to the base function. So \int_eval:x would first do the "edef" expansion on the argument and then pass it to \int_eval:n which would do what? no I think it is perfectly okay to have commands that do something with their "n" arguments in fact all of them do something with the argument content only in some cases it involves expansion which you could also do "prior" to calling the command using the ":nox" approach > > [3] Let's define all macros as non-outer LaTeX 2e already attempted to get rid of \outer and expl3 doesn't have the concept at all. I'm not sure we actually bothered to undefine it, but we should probably do so. > Stepping back a bit, I see that \int_use:n (etc.) might make more sense > for expandable definitions (yielding numbers which are not 'safe', i.e. > as though they were simply typed into the input stream) and \int_eval:n > (etc.) for assignments, etc. > > Thoughts? don't like it I fear. \int_use:n doesn't exist what exists is \int_use:N which is using a integer register at least that is what it is supposed to do conceptually I think that the int side is fine \int_new:N \foo \int_set:Nn \foo {5+6} \int_use:N \foo yields 11 (no space after it) and so does \int_eval:n{5+6} I think what is wrong is what you initially pointed out that \dim_eval:n behaves differently ... but I think that would be best resolved by adding \tex_the:D in the right place. At least that my current thinking on the topic. frank