Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id r3U9jxFs014140 for ; Tue, 30 Apr 2013 11:46:00 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx103) with ESMTP (Nemesis) id 0Mecz6-1U8yXQ0LfM-00OHkN for ; Tue, 30 Apr 2013 11:45:53 +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 r3U9gRXd010426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Apr 2013 11:42:28 +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 r3TM14VM001615; Tue, 30 Apr 2013 11:42:27 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 9210046 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 30 Apr 2013 11:42:27 +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 r3U9gQr2008547 for ; Tue, 30 Apr 2013 11:42:27 +0200 Received: from csep02.cliche.se (csep02.cliche.se [195.249.40.184]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r3U9gC6A028779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 30 Apr 2013 11:42:16 +0200 Received: from nova-2.local (h-129-141.a258.priv.bahnhof.se [81.170.129.141]) by csep02.cliche.se (Postfix) with ESMTP id 422D218669D for ; Tue, 30 Apr 2013 11:42:11 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20 MIME-Version: 1.0 References: <517E353C.5050701@morningstar2.co.uk> <517F75E8.7090900@morningstar2.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id r3U9gRr2008548 Message-ID: <517F9214.9030103@residenset.net> Date: Tue, 30 Apr 2013 11:42:44 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: =?ISO-8859-1?Q?Lars_Hellstr=F6m?= Subject: Re: Behaviour of \SplitArgument with missing input To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <517F75E8.7090900@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by relay.uni-heidelberg.de id r3U9gRXd010426 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:yVC/V6DIpNY=:3GFZf1qBO5AZ6plqucL+9m 14dJvJh4sBAr0DgqvaB4TDW2jsyArqEy8oeZdu8KJw0TkAgKMuzInj1V+YJdQSiNMeZUAl8 H9XoC0tWK+oGQ+/xDP3KfptLEPYzWqtKW1S5k6ysGocJor40+XXpiSr8BRgNdbqQ2W6f0Ie yFzfSa/VqoiI/qvqLrpy6VJ77ZJiG+U0jPsi1HotVtXCviaCtj2WXAKY8wHQLzUCLC04Bel PpNap+cmg7Bg6C9O/HBEGKbQ663E5jeydCvVXnZKwuykRRrV1k/Yy3xSpvK150Zimt3QYJT HgcGQ3biyhcYLbehKNGvpjspRTGHUPEiwZv28TDdYIahIYIzms5ioX0yBvuXPPvDFQFXa4A jhMI8fnv+jDOI1i0Huy18tt+DCyMLHnkjZn6R6ZDiKdrnealXZvH+yoVemGsWqCTZsEUGfP E/B1x1Qf3wl4jC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Pq/zWl1falHDkt7SQ5c+VHLgcuws+krjz3AQQSH4eciH2UYr5EFxJV wQXzPNR3nMeek5APuUT9hO1oHCCkkYSGlAfzsekI9L6f6iZHG8+cOXf9wpE= X-UI-Loop:V01:qIwvrQA9pT0=:v6FyOZEMHrbUuvNizhelWE0Jl3pKn7/c8kmzQq5kWSc= Status: R X-Status: X-Keywords: X-UID: 7198 Joseph Wright skrev 2013-04-30 09.42: > On 29/04/2013 19:50, scott heard wrote: >> Hello, forgive (and correct) me if I misunderstand how this command sh= ould >> be used: >> >> \DeclareDocumentCommand { \foo } >> {> { \SplitArgument { 2 } { ; } } m } >> { \my_command:nnn #1 } >> >> As the output of '\SplitArgument' is some number of brace groups lumpe= d >> together into a '#1', it seems like a test for '-NoValue' would need t= o be >> moved into '\my_command:nnn', i.e. from the xparse interface, into >> "programmer code". As `\IfNoValueTF' is an xparse command, that doesn= 't >> feel correct. If this is a reasonable interpretation/usage, then my >> personal opinion would be that empty brace groups (or something else) > would >> be preferable to -NoValue-'s. >> scott > > That's a separate but related point, and the one I eluded to in my > original e-mail. I've been asked about how one is expected to test for > the '-NoValue-' in the use case outlined, and to provide a code level > interface or (I guess) some guidance on what the team feel is 'correct' > in terms of testing. > > I thought it was best to pin down what is the 'correct' behaviour of > \SplitArgument first. However, it is a fair point that this might affec= t > the desired behaviour. I'd like to see what people feel is needed from > \SplitArgument. (It might turn out we'd prefer to have a different but > code-level testable marker, for example, although that sounds like a lo= t > of effort.) IMHO, the notion that "one cannot use \IfNoValueTF at the code level beca= use=20 that is a high level command" is utterly bizarre. That many low-level=20 features should not be exposed in a high-level context is one thing, but=20 also doing the converse is usually a sign that one's design is flawed=20 somewhere. When a sensible representation of a fundamental concept (missi= ng=20 value, boolean true, boolean false, etc.) can be exposed at the high leve= l,=20 then that representation should be used also at the low level to the exte= nt=20 possible. To me, it is intunitively correct that a \SplitArgument { 2 } { ; } on {b= ar}=20 should yield two NoValues, since clearly two more pieces of data were=20 expected but not provided. It also seems that you may want to provide som= e=20 variant of \SplitArgument that supplies default values when nothing expli= cit=20 is given. For \ang{;;}, one would probably want 0= =20 (i.e., fixed value like for classical \newcommand) as default. For=20 \cline{-}, one would probably want the other value to be the=20 default (a classical feature of \section and friends). So that might be t= wo=20 siblings of \SplitArgument. Lars Hellstr=F6m