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 p9G1w89g013835 for ; Sun, 16 Oct 2011 03:58:09 +0200 Received: (qmail 17830 invoked by alias); 16 Oct 2011 01:58:03 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 16 Oct 2011 01:58:03 -0000 Received: from relay.uni-heidelberg.de (EHLO relay.uni-heidelberg.de) [129.206.100.212] by mx0.gmx.net (mx004) with SMTP; 16 Oct 2011 03:58:03 +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 p9G1tO4b031214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 16 Oct 2011 03:55:24 +0200 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 p9FM1BTN010512; Sun, 16 Oct 2011 03:55:23 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1778339 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sun, 16 Oct 2011 03:55:23 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p9G1tNiE030950 for ; Sun, 16 Oct 2011 03:55:23 +0200 Received: from mail-bw0-f49.google.com (mail-bw0-f49.google.com [209.85.214.49]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p9G1tJtl031201 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL) for ; Sun, 16 Oct 2011 03:55:22 +0200 Received: by bkbc12 with SMTP id c12so6440457bkb.22 for ; Sat, 15 Oct 2011 18:55:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.58.13 with SMTP id e13mr3664789fah.24.1318730118985; Sat, 15 Oct 2011 18:55:18 -0700 (PDT) Received: by 10.152.4.193 with HTTP; Sat, 15 Oct 2011 18:55:18 -0700 (PDT) References: <4E95A9C2.6020607@residenset.net> <4E95C086.7060806@morningstar2.co.uk> <4E96F7BF.9070700@residenset.net> <4E97EA81.6040504@morningstar2.co.uk> <4E99D8B9.6080302@morningstar2.co.uk> Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Whitelist: Message-ID: Date: Sat, 15 Oct 2011 21:55:18 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: Church booleans To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4E99D8B9.6080302@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p7v2e6YIeqtw5m4ww1vaGEzRK0ks+3pTKAEJH5awtW3GswuOhPAuLBI6Gn7J Pd4tFx5d40i36B878/SIWtuDA4gsTn4VNnPHpYa5qELhVhVnBwPxye02Y2m9Id+/pvhtlmaQrATJ MuWZ5baixLzm639r6bzijmH81XPqVUXgm+J5We8dsmsrCpiIKBhwAu4ktg=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: 6946 Is anyone out there using \if_bool:N or \if_predicate:w? No occurrence in TeXlive 2011, and if we switch to Church booleans, those functions would have to go. > Provided it really does not change the interface in any way, there > should no problem with altering the internals. I've been trying to make the change. The end-user interface is not changed, but since booleans become weird beasts (rather than the simple 0/1 switch), they are pretty much impossible to manipulate before the machinery is setup. The problem is then that expl3 and l3bootstrap need to manipulate \l_expl_status_bool very early on. I haven't found a clean way to resolve this issue yet, so I'm a bit stuck. At the end of the day, Church booleans have a definite practical advantage, with non-expandable conditionals in \bool_if:nTF. I'm starting to dislike them, though, from an aestetic point of view, because \char"1 looks nicer than "\marker { \use_i:nn }" (with braces). >> - Change in the priority of the various operators, to be ! > && > ||. >> I believe that this should be changed eventually. It is tricky to get >> right, but I can do that in a couple of week if the general feeling is >> that we should change. > > We probably should consider this, as it does seem that this is a general > feature of boolean logic. I've got this pencilled for after some regex fixes/improvements. (Although I first need to get my system back working, as I don't feel like just -reverting- my past few hour's work.) >> - Change in the interface to use "not", "and" and "or" instead of "!", >> "&&" and "||". I do prefer how boolean expressions look like with "&&" >> and "||", but "&" makes our lifes a little bit awkward in alignments >> (can be made fully robust, with a performance cost ~10-30%?). > > I'm intrigued by the 'fully robust' statement here: I've had some > problems with \halign's, where if you end up with nested Appendix D > tricks then all sorts of trouble starts. In the process of answering your question, I realize that \bool_if:nTF doesn't like being put in the u-part of an alignment preamble (the part before the cell's contents). Actually, I'm getting very confused about all that :(. >>> etoolbox goes with the simple "and", "not" and "or", and to me this >>> seems like a sensible approach. If that is done, there would need to be >>> transitional support for the current syntax, of course. >> >> We can support both syntaxes (temporarily or forever) with no >> performance cost compared to just "&&" and "||". Dropping "&&" and >> "||" in favor of "and " and "or" improves performance a little. >> >> Switching to "and", "or", "not" raises the question of whether to add >> "xor", which is currently missing. That makes priority handling >> tougher, so I'm only half keen on that. > > I don't see why you'd add "and"/"or"/"not" unless the aim was to remove > "&&"/"||"/"!". There are places where alternative syntaxes are helpful, > but I don't see that here. A missing xor function is pretty much my only argument here. Although I guess that we could add some ++ or VV or whatever notation is standard for xor. I'll try to understand how robust we can be within alignments. Regards, Bruno