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 o8KAUZmr016133 for ; Mon, 20 Sep 2010 12:30:36 +0200 Received: (qmail 24024 invoked by alias); 20 Sep 2010 10:30:29 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 20 Sep 2010 10:30:28 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx092) with SMTP; 20 Sep 2010 12:30:28 +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 o8KATf3N003040 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 20 Sep 2010 12:29:41 +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 o8KA1WDn012535; Mon, 20 Sep 2010 12:28:46 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 456658 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 20 Sep 2010 12:28:46 +0200 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 o8KASkfG022476 for ; Mon, 20 Sep 2010 12:28:46 +0200 Received: from mail-pz0-f49.google.com (mail-pz0-f49.google.com [209.85.210.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id o8KATYMk002945 for ; Mon, 20 Sep 2010 12:29:38 +0200 Received: by pzk32 with SMTP id 32so1727788pzk.22 for ; Mon, 20 Sep 2010 03:28:41 -0700 (PDT) Received: by 10.114.120.9 with SMTP id s9mr9815159wac.100.1284978521181; Mon, 20 Sep 2010 03:28:41 -0700 (PDT) Received: from staff-251-218.wireless.adelaide.edu.au (staff-251-218.wireless.adelaide.edu.au [129.127.251.218]) by mx.google.com with ESMTPS id x9sm13232737waj.15.2010.09.20.03.28.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 20 Sep 2010 03:28:40 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1081) References: <4C967C9B.5010706@gmx.de> <71ED7A5B-DE11-45D9-9785-95A1DC795080@gmail.com> <4C9724B4.3010301@residenset.net> X-Mailer: Apple Mail (2.1081) X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id o8KASkfG022477 Message-ID: Date: Mon, 20 Sep 2010 19:58:35 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: boolean expressions in ExplSyntaxNames To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4C9724B4.3010301@residenset.net> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=5D7Q89H36p6i75npGen84eVAEFK/syJmFuaL1OLtauwJ5R/kaZ9HAe8peGX1DeqJL7BW4 1X28hmBsSaikXt0ebYfUaHmtXkk7HChP+4IT8t5foOuRzC8vyH8YP07l+7OgkY63m+qRZCiPVOZg mL0OA==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: 6422 On 20/09/2010, at 6:39 PM, Lars Hellström wrote: > My opinion, if anyone cares, is that using && and || at all in the syntax of \bool_if_p:n is stupid eye-candy. The stated situation is just one of the ways in which it leads to problems; Sorry for the bug. I don't anticipate further problems of this sort, since \ExplSyntax(On/Off) guards against it. > another is that it suggests || and && may sensibly be mixed within the condition, which isn't the case either. How do you mean they can't be mixed? The documentation gives the example \intexpr_compare_p:n {1=1} && ( \intexpr_compare_p:n {2=3} || \intexpr_compare_p:n {4=4} || \intexpr_compare_p:n {1=\error} % is skipped ) && !(\intexpr_compare_p:n {2=4}) > The natural way to express AND or OR of a bunch of boolean conditions in a macro language such a LaTeX is the LISPish one: have macros/functions whose meaning is "AND of my arguments" and "OR of my arguments". IIRC, that would be > > \bool_and_p:nn{}{} > \bool_or_p:nn {}{} > \bool_and_p:nnn{}{}{} > \bool_or_p:nnn {}{}{} > ... > > for as long as one likes to continue that list. It would be straightforward to add these to the syntax; there's already \bool_not_p:n and \bool_xor_p:nn. No reason not to have both; I just prefer infix notation to \bool_and_p:nnn { \intexpr_compare_p:n {1=1} } { \bool_or_p:nnn { \intexpr_compare_p:n {2=3} } { \intexpr_compare_p:n {4=4} } { \intexpr_compare_p:n {1=\error} } } { \bool_not_p:n { \intexpr_compare_p:n {2=4} } } On 20/09/2010, at 7:40 PM, Chris Rowley wrote: > My intuition is to agree with Lars, for the designs reasons he gives and because one mission of this language is that it is reasonably human understandable and consistent. > > My prejudice is not to use things like ¦ & because _I_ have never used them elsewhere They're natural to me, but our mileages no doubt vary, as they say. -- Will