Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id s4U0953U030295 for ; Fri, 30 May 2014 02:09:06 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx101) with ESMTPS (Nemesis) id 0MbwEM-1X62px1HOw-00JLZ9 for ; Fri, 30 May 2014 02:08:59 +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 s4U05rEZ020364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 May 2014 02:05:53 +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 s4TM18Q3009843; Fri, 30 May 2014 02:05:52 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 11051743 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 30 May 2014 02:05:52 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id s4U05qkg019307 for ; Fri, 30 May 2014 02:05:52 +0200 Received: from mail-qg0-f45.google.com (mail-qg0-f45.google.com [209.85.192.45]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id s4U05gxT021818 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 30 May 2014 02:05:45 +0200 Received: by mail-qg0-f45.google.com with SMTP id z60so3255995qgd.18 for ; Thu, 29 May 2014 17:05:41 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.140.94.39 with SMTP id f36mr15346075qge.64.1401408341793; Thu, 29 May 2014 17:05:41 -0700 (PDT) Received: by 10.96.19.42 with HTTP; Thu, 29 May 2014 17:05:41 -0700 (PDT) References: <00e701cf7542$114f8870$33ee9950$@post.harvard.edu> <537DA7E9.7080403@morningstar2.co.uk> <010801cf759c$84533fb0$8cf9bf10$@post.harvard.edu> Content-Type: text/plain; charset=UTF-8 Message-ID: Date: Thu, 29 May 2014 20:05:41 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: Trouble with the .bool_set:N property To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <010801cf759c$84533fb0$8cf9bf10$@post.harvard.edu> 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:v7jpeXqeQDE=:D28pIBUws8zeyk7/wY8dmfTo+P u6oSiOoH+C3zECn2vHhQ/grXqqLKTEHilNKH9GtpTQtHPBq3Mzs9Iw5Be4kvVf+FzRCAO+7uH ucjgk7rx34huvYJj3jECzXc0cLBV2Jl5wzfqddQ19Snkzb0yObAKuVntvuqqN5axZ9Eu5QJ9w jlBUp+0s0xF55ARz11mrTeJRr8fodPlJhXt+te3TiHPIYPgnUdhNvy4r2QG8ZG2/SVL+9vTdc tR4J29IzfIdUsTAdqFBezqb9SxyQ7rOgZD94VudC9c0RsKuscHY7QINE5+sWOvvyHtvfS6rSO FGmVSsermze3eTYwkSDsty/8VtvG50O8VCbbl0/wnEgv6d8ptN5VO7ib/nWU5WbslJFkxe5c8 Q67qjVflXYoxrb0qdCaJbOekr6aSOmgggFmCuNDaBeQkneF4R4X/7BofQe2FyjKAZ3icBIFmu ZPPMT7ZoiRNcEv5u5aMzv1KfUAq0kklcNsHImEvJnMhG+Hnk0dX91lmtDp/BFC8Q+Pws4qlBx 92OOSY0xEsp+hYVKa8iWaX8KGSbB/SmBs4RuuBPNeCwGsd6QThcM1PaZQS2Q48Sk0Oms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 7461 On 5/22/14, pintar@post.harvard.edu wrote: >> 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 } "). Wait, how is that not covered by .bool_set:N and .bool_set_inverse:N? Doing " turnfooingon .bool_set:N = \l_mymodule_fooing_bool " and " turnfooingoff .bool_set_inverse:N = \l_mymodule_fooing_bool " allows the user to use the keys turnfooingon and turnfooingoff as you describe. Well, it also allows the user to do weirder things like "turnfooingoff=false" to turn fooing on. Bruno