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 o1F1wUlv001881 for ; Mon, 15 Feb 2010 02:58:31 +0100 Received: (qmail 16864 invoked by alias); 15 Feb 2010 01:58:24 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 15 Feb 2010 01:58:24 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx040) with SMTP; 15 Feb 2010 02:58:24 +0100 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 o1F1txic021644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 15 Feb 2010 02:56:00 +0100 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 o1EN15tL028587; Mon, 15 Feb 2010 02:55:59 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 378188 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 15 Feb 2010 02:55:59 +0100 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 o1F1twwv008079 for ; Mon, 15 Feb 2010 02:55:59 +0100 Received: from mail-yw0-f178.google.com (mail-yw0-f178.google.com [209.85.211.178]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id o1F1tt5W014486 for ; Mon, 15 Feb 2010 02:55:59 +0100 Received: by ywh8 with SMTP id 8so2069818ywh.3 for ; Sun, 14 Feb 2010 17:55:54 -0800 (PST) Received: by 10.150.117.7 with SMTP id p7mr8494165ybc.192.1266198954090; Sun, 14 Feb 2010 17:55:54 -0800 (PST) Received: from ?129.127.15.244? ([129.127.15.244]) by mx.google.com with ESMTPS id 9sm2191040ywf.35.2010.02.14.17.55.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Feb 2010 17:55:53 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1077) References: <6EBBC8A1-0CB0-451D-AF0A-3EF2A41C0B52@YAHOO.DE> <3C45FBBF-D0F3-4C13-919D-AF69C8A6A808@gmail.com> <4B7895BF.2080805@morningstar2.co.uk> X-Mailer: Apple Mail (2.1077) X-Spam-Whitelist: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by listserv.uni-heidelberg.de id o1F1txwv008080 Message-ID: Date: Mon, 15 Feb 2010 12:25:47 +1030 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: Assorted suggestions pt. 1 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 (Mail was not recognized as spam); Detail=5D7Q89H36p4U4jfdfC5HDevlx1X2sAZgP9e9F2VTUYI/FLDAh5vXTUdJ3cb8VrMsthL0D 3Bm5FvGPWoCdLJEm9HLQdq2oZJ1+efgJyyH9QG+8cq1UKQ2Q4e3tC9qRlfvjUoP37QqmdThnkNK6 /QEzQ==V1; X-Resent-By: Forwarder X-Resent-For: rainer.schoepf@gmx.net X-Resent-To: rainer@rainer-schoepf.de X-Scanned-By: MIMEDefang 2.63 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 6275 On 15/02/2010, at 11:56 AM, Philipp Stephani wrote: >>>> - dedicated stack and queue datatypes that hide their implementation >>> >>> Can you go into more detail about what is deficient in l3seq for this? >> >> I think we are getting at "concepts" here: something like \cs_set_eq:NN \stack_new:N \seq_new:N, ... > > Yes. This separation would perhaps be a bit clearer to the user. I read the discussion in source3 on removing \seq_put_left in favor of \seq_push, but with a stack datatype (which would be rather trivial) we would have the same situation as in C++: A deque as a container (a L3 seq is in fact similar to a deque because you can add elements at both ends, but not in the middle, as opposed to vectors and lists), and stack and queue as container adaptors. However, this is a purely design decision (Python, for example, has no dedicated stack datatype). Ah, I see what you mean. So add l3queue and l3stack with allocation all alike l3seq, but with \queue_push, \queue_pop == \seq_push_left, \seq_pop_right and \stack_push, \stack_pop == \seq_push_right, \seq_pop_right Note that these pop_left and pop_right functions don't yet exist but we have been planning on implementing them, as well as normalising the names that are currently duplicated such as \seq_put_right and \seq_push. Just haven't got around to it so far. My personal preference is to keep the number of data structures to a minimum; we already have a fairly large number of modules and adding "queue" and "stack" doesn't make things any simpler in this regard. Thanks again for the feedback, -- Will