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 p7RLPov3017878 for ; Sat, 27 Aug 2011 23:25:51 +0200 Received: (qmail 20858 invoked by alias); 27 Aug 2011 21:25:45 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 27 Aug 2011 21:25:45 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx031) with SMTP; 27 Aug 2011 23:25:45 +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 p7RLMpOD003110 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 27 Aug 2011 23:22:51 +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 p7RCBABh002634; Sat, 27 Aug 2011 23:22:50 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1603754 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 27 Aug 2011 23:22:50 +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 p7RLMoSS011081 for ; Sat, 27 Aug 2011 23:22:50 +0200 Received: from lon1-post-2.mail.demon.net (lon1-post-2.mail.demon.net [195.173.77.149]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p7RLMb9Q003066 for ; Sat, 27 Aug 2011 23:22:40 +0200 Received: from morningstar2.demon.co.uk ([80.176.134.7] helo=palladium.local) by lon1-post-2.mail.demon.net with esmtp (Exim 4.69) id 1QxQKq-0001HC-cF for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Sat, 27 Aug 2011 21:22:37 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 References: <35FEA381-6EA8-4464-9E0F-C504C2D92641@gmail.com> X-Enigmail-Version: 1.3.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4E59601C.5010209@morningstar2.co.uk> Date: Sat, 27 Aug 2011 22:22:36 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Joseph Wright Subject: Re: l3keys: mirror boolean key To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (Sender is in whitelist: joseph.wright@MORNINGSTAR2.CO.UK); Detail=5D7Q89H36p4L00VTXC6D4q0N+AH0PUCnBi0P5cROEGjO+pG7NAH/K+tf9SrVFtpLrKONl 2T9EL4W4U4jgzLbnCcGpk1z/zwmKT/K1fv3lD0=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: 6835 On 27/08/2011 13:16, Bruno Le Floch wrote: > On 8/27/11, Will Robertson wrote: >> On 26/08/2011, at 3:04 AM, Ulrike Fischer wrote: >> >>> Now I want to define a "mirrored" key >>> >>> no-sym >>> >>> so that "no-sym = true" sets \l_chessfss_sym_bool to false. >>> >>> Is there some easy way? >> >> Not directly as far as I know (using >> >> .code:n = { \bool_set_false:N \l_chessfss_sym_bool } >> >> works of course but it's not the best interface), so I think this would be a >> good addition. (I seem to remember kvoptions has a similar feature.) Which >> do you think is best to name it? >> >> no-sym .bool_unset:N = \l_chessfss_sym_bool >> no-sym .bool_set_false:N = \l_chessfss_sym_bool >> no-sym .bool_set_reverse:N = \l_chessfss_sym_bool > > I find .bool_set_reverse:N more descriptive (cf. \reverse_if:N), as > no-sym = false is valid user input, I guess? Early-on in the life of l3keys, we did have '.bool_set_:N' (where I forget exactly what was). The reasons we did not keep it then were: a) The idea was to keep things simply initially; b) The other variable-setting functions all mirror the base expl3 names. Now, boolean keys are a bit odd, as they are actually a special kind of choice (that's how they are implemented). So it may well be best to provide this ability. I guess I favour '.bool_set_inverse:N'. -- Joseph Wright