Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s4M961hN009301 for ; Thu, 22 May 2014 11:06:02 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx001) with ESMTPS (Nemesis) id 0M70LN-1Wz8Kt03W9-00wlbO for ; Thu, 22 May 2014 11:05:54 +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 s4M92J2w000789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 May 2014 11:02:20 +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 s4M3x38B018895; Thu, 22 May 2014 11:02:18 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11061180 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 22 May 2014 11:02:18 +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 s4M92IZQ000614 for ; Thu, 22 May 2014 11:02:18 +0200 Received: from mail-qg0-f49.google.com (mail-qg0-f49.google.com [209.85.192.49]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s4M92DXh000648 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 22 May 2014 11:02:17 +0200 Received: by mail-qg0-f49.google.com with SMTP id a108so5087427qge.22 for ; Thu, 22 May 2014 02:02:13 -0700 (PDT) X-Received: by 10.140.107.137 with SMTP id h9mr25118132qgf.30.1400749333480; Thu, 22 May 2014 02:02:13 -0700 (PDT) Received: from Democritus (h106.160.17.98.dynamic.ip.windstream.net. [98.17.160.106]) by mx.google.com with ESMTPSA id w2sm6013866qar.21.2014.05.22.02.02.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 May 2014 02:02:12 -0700 (PDT) X-Google-Original-Sender: "Jura Pintar" References: <00e701cf7542$114f8870$33ee9950$@post.harvard.edu> <537DA7E9.7080403@morningstar2.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQIxL1g7aqegxfBTqmzE8f5eX9UbvQHhPKs1mnnHfCA= Content-Language: en-us X-Spam-Check-Skipped: Loadavg 12.47 Message-ID: <010801cf759c$84533fb0$8cf9bf10$@post.harvard.edu> Date: Thu, 22 May 2014 05:02:10 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: pintar@POST.HARVARD.EDU Subject: Re: Trouble with the .bool_set:N property To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <537DA7E9.7080403@morningstar2.co.uk> 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:2PE2RoE+CpU=:QaPrXKNvL2Jk1F6sFe0oM+yJkV s52+fPRsLHZXykr3T8915BtYmD7yoIoH0Fn9hRtoxCGlV0DK4QW4md6yfnYqbwYQMEurvI7R2 +9U2vEChtjzxzRRV7YJurTiGHM+ToAhDzIlOpfOnUNYJGQm1XmJefEg5uWb4VQnBsJyXQIuSM ta3ms+GHtKi7xznVMwl33BHTo7oX62Ukus/KakPCBDLJjokSaOedD1QvGsWDXOES5jkzDk3k9 KRvwnXhP4ChEwQMEtoaIEv6jLKCf4rYjG4AAou6NSg7vyMFm/oM96jI+Q7ssErSAM3ORyL/0H gE64IId1tk3CKbtetiGCqDZP2lPK/d7KJmB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hS+tDUE5RHDSCr74sLPueyxiGRhXlbrtQmdODA+dH6m53v+oqqxYsgaLG 7eafcxurNPXFGZa4d2veAoWT+CT6v1+MEfT3ZauheGVvW7YrkSgl3iSnpF1u4+AhkucnkwQY4 XlhHMo7jfpWwm5Wd1K5Kl/uJf+Mayz7sfkZKGehLR X-UI-Loop:V01:nlLdGnXqk8Q=:5INPk3nVtltxEF5WwtbiEOEgYOrXiGFk48QGBhPi1C8= Status: R X-Status: X-Keywords: X-UID: 7439 > It's a bit more complicated than that :-) It usually is! > If you look at the code, any case where someone sets up a 'choice of choices' > will fail. That's not good, and so before any worries about booleans > specifically I'll fix this more general issue. My feeling is that trying to set up a > 'choice of choices' key is an error in the definition rather than at point of use, > so I'm minded to trap such cases and issue a error message. Does that sound > reasonable? For example, what is something like > > key-1 .choice: , > key-1 / choice-a .choice: , > key-1 / choice-a / value-1 .code = ... > > actually going to achieve? Yes, I'd noticed that it will fail (I actually mentioned it in passing in the tex.stackexchange discussion), but it didn't worry me so much precisely because I couldn't think of any reason why one would want to set up a case like that. Of course, it's definitely better if attempts to do so raised an error instead of getting stuck in a loop! > One the specifics of boolean keys, I can see the point here about > set_true/set_false as they match 'normal' variable setting. On the other > hand, the original design here was to recognise that a boolean key is > somewhat 'special': it is a choice from a limited range of values. > Moreover, my thinking was that enforcing "true"/"false" as the values > avoided the possible need for people to allow for "on"/"off" or "yes"/"no" > (I've worried about this in the past). It was also meant to indicate that a > boolean key should be one that 'reads' as > > = (true|false) > > rather than > > = (foo|bar) > > as that seems less useful to the end user (if the options are more complex > than true/false then some other description is needed at the documentation > level anyway). I see your point, but I can also imagine cases where at the user end it might feel more natural to have something like \mymoduledoclevelsetup{ turnfooingon } \mymodulecoclevelsetup{ turnfooingoff } instead of \mymoduledoclevelsetup{ fooing = true } \mymoduledoclevelsetup{ fooing = false } I guess the decision here is really between nudging package authors towards uniformity and trusting them to develop a syntax that's best for their target users on their own (it's not exactly imposing uniformity, because a package writer stubborn enough could always type the few extra characters to get " turnfooingon .code:n = { \bool_set_true:N \l_mymodule_fooing_bool } "). I tend to be a fan of uniformity myself, but I wouldn't go as far as to claim I have a worked out ideological position on it. :) Best, Jura