Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by h2774747.stratoserver.net (8.15.2/8.15.2/Debian-3) with ESMTP id w92GZBoL021475 for ; Tue, 2 Oct 2018 18:35:12 +0200 Received: from relay2.uni-heidelberg.de ([129.206.119.212]) by mx-ha.gmx.net (mxgmx014 [212.227.15.9]) with ESMTPS (Nemesis) id 1Miaof-1fTtkb0U8l-00fn45 for ; Tue, 02 Oct 2018 18:35:06 +0200 Received: from relay2.uni-heidelberg.de ([129.206.119.212]) by mx-ha.gmx.net (mxgmx014 [212.227.15.9]) with ESMTPS (Nemesis) id 1Miaof-1fTtkb0U8l-00fn45 for ; Tue, 02 Oct 2018 18:35:06 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.15.2/8.15.2) with ESMTP id w92GZ5Es017136; Tue, 2 Oct 2018 18:35:05 +0200 Received: from listserv (localhost [127.0.0.1]) by listserv.uni-heidelberg.de (Postfix) with ESMTP id 85CFD1267E0; Tue, 2 Oct 2018 16:08:12 +0200 (CEST) Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 29982306 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 2 Oct 2018 16:08:12 +0200 Delivered-To: latex-l@listserv.uni-heidelberg.de Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.119.212]) by listserv.uni-heidelberg.de (Postfix) with ESMTP id 54B321247D6 for ; Tue, 2 Oct 2018 16:08:12 +0200 (CEST) Received: from smtprelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by relay2.uni-heidelberg.de (8.15.2/8.15.2) with ESMTPS id w92E855r006737 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 2 Oct 2018 16:08:08 +0200 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 5BAB78368EFC for ; Tue, 2 Oct 2018 14:08:04 +0000 (UTC) X-Session-Marker: 77696C6C40777370722E696F X-Spam-Summary: 40,2.5,0,,d41d8cd98f00b204,will@wspr.io,:,RULES_HIT:41:152:355:379:541:599:800:960:973:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1381:1437:1513:1515:1516:1518:1521:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4557:4605:5007:7514:7652:7901:7903:8531:9110:10011:10400:10848:11026:11232:11658:11914:13069:13071:13311:13357:14180:14181:14721:21060:21080:21451:21627:30012:30041:30054:30090,0,RBL:42.241.9.134:@wspr.io:.lbl8.mailshell.net-62.14.32.186 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:1:0,LFtime:32,LUA_SUMMARY:none X-HE-Tag: pin42_293773acbc006 X-Filterd-Recvd-Size: 2307 Received: from [192.168.0.15] (n42-241-9-134.adl1.sa.optusnet.com.au [42.241.9.134]) (Authenticated sender: will@wspr.io) by omf16.hostedemail.com (Postfix) with ESMTPA for ; Tue, 2 Oct 2018 14:08:02 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) References: X-Mailer: Apple Mail (2.3445.100.39) Message-ID: Date: Tue, 2 Oct 2018 23:37:58 +0930 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Will Robertson Subject: Re: Function arguments vs "global" variables To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-UI-Filterresults: notjunk:1;V01:K0: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:l+WiHvbsCOIi36Qqy8+w9LE9D1u3STUcclw0K4g1wek= X-UI-Out-Filterresults: notjunk:1;V01:K0:VJb2yGUd/BU=:lU3D13n+XsnQj3pwetatC9 c5I+h6yduFgLjr36o/FfIYrwOcorz4A66es1nyfQT+TOIRi7i1QZyEgUkn58HDjPJjAQr8oFz 3qhmDf6+5gqG0P4pCgvpHhWLBpLIlTVEF8hXHRdBcm88Co47oN3B45GmL3I7zY20lI9rjZB61 k9pUertq+CTptS46vecUHEnTblvF2rv6mImFmqud5v/SWpRzWzSqsnWpqCxubwS+TzDtwObAu jEjvFA0FwJnAozP8zb0bMqDSg+Z4K/tUrthKLNoPjZkY8XdS21C4kA/cLdv6LTXQ9vQ8q9e7y BBJETxSUC3WxgSCNoZqxJYhyNsHwaN1t9+r2oToriChOZKIrXrxw9JAj8q8ZnR5WlbgqE52/F yKeXTm96dHVsdA3hD/hEuaZI6VlVpwiLHwYpTnSWezYJALAvpcuyKCz3f5Mu40tPxPCdN1u1Y LORnOHZL+dsJ0u9FLKgbEYrpJn2fEDY= X-Scanned-By: MIMEDefang 2.78 on 81.169.212.23 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by h2774747.stratoserver.net id w92GZBoL021475 Status: R X-Status: X-Keywords: X-UID: 8088 Hi Johannes, > On 2 Oct 2018, at 11:16 pm, Johannes Burtscher wrote: > > These functions exist solely to keep things reasonably organized and are never called by any other function. The question now is: should these auxiliary functions take their input as actual arguments or should they simply rely on the variables set up by the caller? This is an age-old question for me, and I can’t say I’ve definitively decided. In my own code I think it comes down to scope. If you’re operating on variables that are broader in scope than the auxiliary functions you’re using to process them, I wouldn’t use arguments. Of course, using arguments means you can also use expl3’s argument processing (with \cs_generate_variant:Nn etc) which can make it a bit more explicit exactly what your functions should be expecting, but that’s not always necessary or even appropriate in the case of “seq” and other higher-level data types. In the example you give, I would definitely use arguments: \__jfa_func_aux:N \l__jfa_my_seq This makes it really clear that you’re taking this seq and doing something on it, as opposed to (say) some other aux-related tidying/initialisation or writing to the log file. Of course this is just my opinion after refactoring my code a few times in both directions :) Hope this helps, Will