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 p3F0UZ0Q030485 for ; Fri, 15 Apr 2011 02:30:36 +0200 Received: (qmail 2661 invoked by alias); 15 Apr 2011 00:30:29 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 15 Apr 2011 00:30:29 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx053) with SMTP; 15 Apr 2011 02:30:29 +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 p3F0SMkv022748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Apr 2011 02:28:22 +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 p3EM18xf027596; Fri, 15 Apr 2011 02:28:21 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1205986 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Fri, 15 Apr 2011 02:28:21 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.1/8.13.1) with ESMTP id p3F0SLie006393 for ; Fri, 15 Apr 2011 02:28:21 +0200 Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p3F0SGfE021978 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Fri, 15 Apr 2011 02:28:21 +0200 Received: by yxh35 with SMTP id 35so1485739yxh.22 for ; Thu, 14 Apr 2011 17:28:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.73.230 with SMTP id v66mr220061yhd.134.1302826962614; Thu, 14 Apr 2011 17:22:42 -0700 (PDT) Received: by 10.147.136.4 with HTTP; Thu, 14 Apr 2011 17:22:42 -0700 (PDT) References: <4DA5C4E2.8090005@morningstar2.co.uk> <58AFBC3A-4209-4BC0-BB3A-5B14D6B5EFD8@gmail.com> <4DA727A9.2050903@morningstar2.co.uk> Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Whitelist: Message-ID: Date: Thu, 14 Apr 2011 20:22:42 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Re: The nature of popping from an empty sequence To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4DA727A9.2050903@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p4yCuwxJv6KY0FCZRnwZ+13WGkCmnrOa3LzQMYzohV6vtntMmji1BSnaAJ8s pNj4Tb+bBvtOTpiHn58nU4H7AwTb1TfFYLuf3RyUV3QLogHQNViYVC1gg56EWOwX4a91+2dEPmW4 H/OeYoGDGtPrwO11SxtokNsMrYf6b46zmwBfz6+nVJ/JXK1xr7FCsSw8sf7FgpPzIzOxA==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: 6705 >> * These should probably be consistent. >> * I think returning a quark is dangerous in case of sloppy package >> authors. From the seq point of view, I like the idea of \seq_pop:NNF, with a \seq_pop:NN variant for an expl3-provided error. For prop, a missing key is more often not an error(?), so perhaps providing all four \prop_get:NnN(T)(F) variants may make sense. They would be implemented internally with a quark test on the result of \prop_get:NnN (very small performance overhead). Then \prop_if_in:Nn(TF) would be much less useful, since it is just as slow as \prop_get:NnN(T)(F). > I find that the quark-based approach is about twice as fast as using > \prop_if_in:Nn. Yes, you end up doing the same work (defining an auxiliary function, expanding the prop, grabbing delimited arguments) twice. And quark tests on single tokens are fast. In these kind of cases, I feel like providing an optimized function in the kernel is better than letting higher-level programmers try to guess what is the right/fastest way of doing things. -- Regards, Bruno