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 p8JAimZx009227 for ; Mon, 19 Sep 2011 12:44:50 +0200 Received: (qmail 22249 invoked by alias); 19 Sep 2011 10:44:42 -0000 Delivered-To: GMX delivery to rainer.schoepf@gmx.net Received: (qmail invoked by alias); 19 Sep 2011 10:43:32 -0000 Received: from relay2.uni-heidelberg.de (EHLO relay2.uni-heidelberg.de) [129.206.210.211] by mx0.gmx.net (mx073) with SMTP; 19 Sep 2011 12:43:32 +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 p8JAf7Wn000791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Sep 2011 12:41:08 +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 p8JAReo2018389; Mon, 19 Sep 2011 12:41:06 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 1612063 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Mon, 19 Sep 2011 12:41:06 +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 p8JAf6Al013863 for ; Mon, 19 Sep 2011 12:41:06 +0200 Received: from mail-ew0-f44.google.com (mail-ew0-f44.google.com [209.85.215.44]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id p8JAerMh032717 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Mon, 19 Sep 2011 12:40:58 +0200 Received: by ewy6 with SMTP id 6so581586ewy.31 for ; Mon, 19 Sep 2011 03:40:53 -0700 (PDT) Received: by 10.14.19.208 with SMTP id n56mr702094een.14.1316428853419; Mon, 19 Sep 2011 03:40:53 -0700 (PDT) Received: from irwin.vpn.uni-freiburg.de ([93.216.240.85]) by mx.google.com with ESMTPS id d12sm44994632eeb.8.2011.09.19.03.40.51 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Sep 2011 03:40:51 -0700 (PDT) Received: by irwin.vpn.uni-freiburg.de (Postfix, from userid 500) id 0E93C1EA6A; Mon, 19 Sep 2011 12:45:57 +0200 (CEST) Mail-Followup-To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE References: <4E6D0C75.6090500@morningstar2.co.uk> <20110919104222.4501dbcd@marcin-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID: <20110919104557.GA30040@oberdiek.my-fqdn.de> Date: Mon, 19 Sep 2011 12:45:57 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Heiko Oberdiek Subject: Re: Scratch variables To: LATEX-L@listserv.uni-heidelberg.de In-Reply-To: <20110919104222.4501dbcd@marcin-desktop> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-GMX-Antispam: 0 (eXpurgate); Detail=5D7Q89H36p6sJLDpZh614LdjtwLz6vwIWUFdXWMBULS4lQXACicPRzGRIcIQgWKkQLesv p4MLmsuXQJDVpgz8+YSLINQBeJwAJGz4E7LiG7Z8weydmFS7LBZ31D4ckw2/CbQOJYlgyLrQCx/D trrxEqRfqC2SyaGuZ8ZlHp8OP0t9H1leGIdTAhqnjS7B9jJpJyMdRSdL8M=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: 6880 On Mon, Sep 19, 2011 at 10:42:22AM +0200, Marcin Borkowski wrote: > Dnia 2011-09-11, o godz. 20:31:01 > Joseph Wright napisa??(a): > > > Hello all, > > > > Currently, provision of scratch variables (such as \l_tmpa_tl) is > > somewhat inconsistent in expl3. However, it is also not entirely clear > > if these 'general scratch' variables are really idea in any case. Do > > people see a general need for these variables, or will most users > > expect to define their own scratch space in all cases? > > > > (The kernel does not use any of these scratch variables, so they are > > only intended for third-party use in any case.) > > I do not (yet) use LaTeX3, but I am an author of one LaTeX2e class (not > distributed yet) and I have to say that I find such scratch variables > quite useful. Defining "private" ones in packages is what seems to me > a waste of resources. I agree. But the risks should not be forgotten. Because any can use them, the author of one use case has to be in full control of the code inbetween. For example, using \count@ as scratch count register: \count@=123 \modulo{\count@}{7} \message{\number\count@} And now \modulo also uses \count@ as scratch register ... Sneaky bugs can happen if a scratch variable is used and changed by several functions at the same time. Yours sincerely Heiko Oberdiek