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 p3E9pm41028402 for ; Thu, 14 Apr 2011 11:51:49 +0200 Received: (qmail 15910 invoked by alias); 14 Apr 2011 08:51:44 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 14 Apr 2011 08:51:42 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx096) with SMTP; 14 Apr 2011 10:51:42 +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 p3E8jjFQ013969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Apr 2011 10:49:28 +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 p3E8iOYI020770; Thu, 14 Apr 2011 10:45:24 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1221485 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 14 Apr 2011 10:44:36 +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 p3E8ialj031601 for ; Thu, 14 Apr 2011 10:44:36 +0200 Received: from mail-pz0-f49.google.com (mail-pz0-f49.google.com [209.85.210.49]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id p3E8iN6v018420 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Thu, 14 Apr 2011 10:44:31 +0200 Received: by pzk5 with SMTP id 5so793669pzk.22 for ; Thu, 14 Apr 2011 01:44:23 -0700 (PDT) Received: by 10.68.56.104 with SMTP id z8mr333921pbp.81.1302770663029; Thu, 14 Apr 2011 01:44:23 -0700 (PDT) Received: from staff-248-220.wireless.adelaide.edu.au (staff-248-220.wireless.adelaide.edu.au [129.127.248.220]) by mx.google.com with ESMTPS id o1sm1983379wfl.21.2011.04.14.01.44.20 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Apr 2011 01:44:21 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1081) References: <4DA5C4E2.8090005@morningstar2.co.uk> X-Mailer: Apple Mail (2.1081) X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id p3E8ialj031606 Message-ID: <58AFBC3A-4209-4BC0-BB3A-5B14D6B5EFD8@gmail.com> Date: Thu, 14 Apr 2011 18:14:17 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: The nature of popping from an empty sequence To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <4DA5C4E2.8090005@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p4nBervZEw6oAvlO431FVeIpgfoQRvf9NI3fq6jvYsc6YByGNabTzAU40Kzs ovbhYSrpo7YWhYEI0RH1/xQN8VTfVm7wViHTVs/aIH38lAOTqvRoVFgS6dlOqBd/759mfqJ2o93w mSwvcCe1U9MTMC/xI5DhC4/khtLI/dH4TWL/D5+wIzWc+l1k2M9ihy7XN94qKG4n7Z29A==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: 6702 On 14/04/2011, at 1:14 AM, Joseph Wright wrote: > Currently, if you do > > \prop_get:NnN \ { } \ > > and the is not in the \ then the \ ends up as > \q_no_value. On the other hand, for sequences trying to 'pop' or 'get' > from an empty sequence leads to a (deliberate) error. My personal thoughts: * These should probably be consistent. * I think returning a quark is dangerous in case of sloppy package authors. * I favour a deliberate error message for all in such cases, with a variant function for the "error" case; e.g., \seq_clear:N \l_tmp_seq \seq_pop:NN \l_tmp_seq \x should yield "Error: The sequence \l_tmp_seq is empty." with the possibility of also writing \seq_clear:N \l_tmp_seq \seq_pop:NNF \l_tmp_seq \x { } in which the recovery code is executed in this case. * * * The above is just my own view on things and not necessarily optimal. I'm open to discussion, of course. Cheers, -- Will