Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t6H8nbdD006226 for ; Fri, 17 Jul 2015 10:49:39 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx002) with ESMTPS (Nemesis) id 0MWBh3-1ZRHl71ZSj-00XNmP for ; Fri, 17 Jul 2015 10:49:32 +0200 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 t6H8k85C021045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Jul 2015 10:46:09 +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.8) with ESMTP id t6H8SHWh028762; Fri, 17 Jul 2015 10:46:08 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12352735 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 17 Jul 2015 10:46:08 +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.8) with ESMTP id t6H8k8CJ029952 for ; Fri, 17 Jul 2015 10:46:08 +0200 Received: from nov-007-i510.relay.mailchannels.net (nov-007-i510.relay.mailchannels.net [46.232.183.64]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t6H8jxZu017625 for ; Fri, 17 Jul 2015 10:46:03 +0200 X-Sender-Id: netnames|x-authuser|joseph.wright@morningstar2.co.uk Received: from smtp3.easily.co.uk (ip-10-204-4-183.us-west-2.compute.internal [10.204.4.183]) by relay.mailchannels.net (Postfix) with ESMTPA id 69635A06D4 for ; Fri, 17 Jul 2015 08:45:56 +0000 (UTC) X-Sender-Id: netnames|x-authuser|joseph.wright@morningstar2.co.uk Received: from smtp3.easily.co.uk (smtp3.easily.co.uk [10.45.8.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.5.1); Fri, 17 Jul 2015 08:45:57 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: netnames|x-authuser|joseph.wright@morningstar2.co.uk X-MailChannels-Auth-Id: netnames X-MC-Loop-Signature: 1437122756782:2253760635 X-MC-Ingress-Time: 1437122756782 Received: from [139.222.114.154] (port=51251 helo=[139.222.114.154]) by smtp3.easily.co.uk with esmtpa (Exim 4.43) id 1ZG1HG-0003pG-Eb for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 17 Jul 2015 09:45:54 +0100 X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-AuthUser: joseph.wright@morningstar2.co.uk Message-ID: <55A8C0C2.3040908@morningstar2.co.uk> Date: Fri, 17 Jul 2015 09:45:54 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: expl3 boolean expressions: lazy evaluation To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:XB28qNqDu18=:eC5CanS1P+6kNP/1+y2XRPaUWT 8XEWN7nUClTQetOvWmbFNRLj53spripa6tDL871X5mwsy2uTndcyx9HDKjE4PzngmklJnnpVE BDyMn281ldOAzL35reGUtv3mYyXob2EUgWZOslzHIU38KeXn/FafuctDiw/rp/pv7ulYcSGw1 FfeHEqrlJOCxiw+j9qIz7TjJnzu8YQNnCr0E0lQfsX23d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Jk/cgjhGL3csl17EDN1dUBt94wmc33amhv22hJlPSWciZ uE5YpCuafbclevKSYCdRww4Dur6tzoBzysRJi4hbDjTdzRW1Qmej9ByfeDtFXE3Mfzz2P4JHr cNnJk1aSZJz21A/de97VN5vKsI/NOgvkCfuVz4Fr2HoKV+NNc06w9I5GGCfGA4ey58hoHSb6l fkXHHBvEulL1RVOmV6/ExDrplKgKT4cPgHVWBPhzn2zjaMfpJHBg29tI0EL0CLIhDwpauWSA= = X-UI-Loop:V01:ngLHDECuIyQ=:MrwA3Jy5ezAAvXPKsgNXJeOOhQt7SnCjJDUpFPsy5n4= X-UI-Out-Filterresults: notjunk:1;V01:K0:1peDKdOJtmg=:uhwUQ/dsEm/01jLSb5YT6U fjlsOrSqRqRf6KMQyyYgtzF1J3RsYZXHL9VkbG0+gZmIbOikmMh+CUoQLm90f5VZhBkJh1Pqc y7MIvhgk1EhG0EzkuzJeLYSyucty0JX9RrCcyZA0rCZ0Q/6E6Q5U2TeUz2uhVpHBZ0D4c7UyB IcHJ6yLV1bt7NN9EMEfqRvdckuPR/HJ4wqxI0rHLB1z+qWy4VCR1llBIGBOB7C8YCJrJM1DmZ oSIECVNosR49UJFSUqkHGsfJvRR2lS8/U8QJCFdkbYNcwQDabN4b/3uvLMxDNm6LLxQsIte6O ef0DXg3u//ARshS6Wh9HXAv7XHKDb8JVbc6rM5l2lma0ll9O2s95Y8yp2d7q8J0z6r9VHHPRC v9MgRl9RlwyaPnOZAZIkDUrKpmNvW/zfa/INPjx4W/5idMzPfc3vofxfbOL3wu1sQ3Cje7rEF hcyP2f6/VOoGiiDBTjADwKQC5bkw6HnwMV3JQ/XSjlJBmRwZn1DE X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7788 Hello all, expl3 current provides the idea of expandable boolean expressions in the form \bool_if:nTF { ( && ) || ... } with lazy evaluation. However, as detailed in https://github.com/latex3/svn-mirror/issues/217 there is an issue with this: as parentheses are part of the syntax, any that are sent through to the tests from 'above' can cause an issue. For example \cs_new:Npn \foo:N #1 { \bool_if:nTF { \token_if_eq_charcode_p:NN + #1 || \token_if_eq_charcode_p:NN - #1 } will fail if #1 is ")". This situation is clearly not ideal and we want to find the best way to address it with minimal impact on real-world use of \bool_if:n(TF). It seems that any fix requires some change of documented behaviour. In particular, we note that the problem can be dealt with if we drop lazy evaluation. However, that might impact on current use cases. An obvious issue is that something like the code currently in the expl3 driver selection \bool_if:nTF { \cs_if_exist_p:N \pdftex_pdfoutput:D && \int_compare_p:nNn \pdftex_pdfoutput:D > \c_zero } { pdfmode } { dvips } will fail as the second test will not be skipped. We note though that this case is likely unusual: in general expl3 variables should be declared before use so should. A quick sweep over TL2015 shows the following packages would have to be updated following any change: - media9 -ocgx2 (Other packages do use \cs_if_exist_p:(N|c) but not in a way which relies on lazy evaluation.) Are there other obvious issues if we switch from lazy evaluation? If the change is to be made we intend to work with package authors in advance to make sure that users are not impacted. -- Joseph Wright