Received: from mail.proteosys.com ([213.139.130.197]) by nummer-3.proteosys with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Mar 2009 18:05:11 +0100 Received: by mail.proteosys.com (8.14.3/8.14.3) with ESMTP id n2CH5AJj008022 for ; Thu, 12 Mar 2009 18:05:11 +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 n2CGwQsL010643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 12 Mar 2009 17:58:26 +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 n2CEZ14Y010714; Thu, 12 Mar 2009 17:58:18 +0100 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 15.5) with spool id 202599 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 12 Mar 2009 17:58:18 +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 n2CGwEkA014455 for ; Thu, 12 Mar 2009 17:58:14 +0100 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id n2CGwAHl023861 for ; Thu, 12 Mar 2009 17:58:13 +0100 Received: from morse.mittelbach-online.de (p54A850B0.dip.t-dialin.net [84.168.80.176]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1LhoEU1H2A-0004iE; Thu, 12 Mar 2009 17:58:10 +0100 Received: by morse.mittelbach-online.de (Postfix, from userid 501) id 7967256249; Thu, 12 Mar 2009 17:58:07 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <49B90B59.9060706@morningstar2.co.uk> X-Mailer: VM 7.19 under Emacs 21.3.1 X-Provags-ID: V01U2FsdGVkX1+qum6J+iKR3V7UUYCZ8IyH0zBWfMkjPs8eLGK h8+yT8J8I5bUKsTb9LzPnn/BZEw+U5SAX8YlfbsC2XaVn/w504 B/NbOk7/BmWOLgEFpnicRahlPntDaiS X-Spam-Whitelist-Provider: Message-ID: <18873.16159.187880.726174@morse.mittelbach-online.de> Date: Thu, 12 Mar 2009 17:58:07 +0100 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Frank Mittelbach Subject: Re: Functions with no arguments To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: X-ProteoSys-SPAM-Score: -104 () RCVD_IN_DNSWL_MED,USER_IN_WHITELIST X-Scanned-By: MIMEDefang 2.65 on 213.139.130.197 Return-Path: owner-latex-l@LISTSERV.UNI-HEIDELBERG.DE X-OriginalArrivalTime: 12 Mar 2009 17:05:11.0919 (UTC) FILETIME=[B487B7F0:01C9A334] Status: R X-Status: X-Keywords: X-UID: 5709 Will Robertson writes: > On 12/03/2009, at 11:47 PM, Joseph Wright wrote: > > > A "philosophical" question. To make various bits of code clearer, I'm > > in the habit of splitting self-contained parts off. Sometimes, this > > results in functions which take no arguments. Under the LaTeX3 > > scheme, > > is it "acceptable" to have functions of no arguments rather than tlps > > containing the data? > > To be hasty (and not particularly experienced :) ) I would say yes, > this is a more than acceptable idea. I see no problem (quite the > contrary) with functions that say "initialise the local variables > we're going to use" or "detect the mode that we're currently in", > which do not require any information (besides the current state of > things) passed to them. > > I think of tlp's more as data containers, which could even contain > functions to call in certain circumstances, but which wouldn't be used > in general to store entire "subroutines" for repeated execution. precisely. functions without arguments are not only acceptable but in my book should be used whenever the focus is on execution rather than on storage and/or manipulation. It is true that you can execute a tlp (after all we are in a macro language) but the focus for tlp is the storage bin. for precisely this reason we have \c_empty_tlp but also \prg_do_nothing: etc. So yes, please use functions (ie ending in ":") whenever you a splitting things apart in executable bits cheers frank