Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by h2774747.stratoserver.net (8.15.2/8.15.2/Debian-3) with ESMTP id w92GZ0gW021472 for ; Tue, 2 Oct 2018 18:35:01 +0200 Received: from relay2.uni-heidelberg.de ([129.206.119.212]) by mx-ha.gmx.net (mxgmx115 [212.227.17.5]) with ESMTPS (Nemesis) id 1MGj2g-1fte7I2U7O-00DmX8 for ; Tue, 02 Oct 2018 18:34:54 +0200 Received: from relay2.uni-heidelberg.de ([129.206.119.212]) by mx-ha.gmx.net (mxgmx115 [212.227.17.5]) with ESMTPS (Nemesis) id 1MGj2g-1fte7I2U7O-00DmX8 for ; Tue, 02 Oct 2018 18:34:54 +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 w92GYs2R016922; Tue, 2 Oct 2018 18:34:54 +0200 Received: from listserv (localhost [127.0.0.1]) by listserv.uni-heidelberg.de (Postfix) with ESMTP id DFDB312744E; Tue, 2 Oct 2018 15:56:22 +0200 (CEST) Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 29982258 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 2 Oct 2018 15:56:20 +0200 Delivered-To: LATEX-L@listserv.uni-heidelberg.de Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (Postfix) with ESMTP id 4644A12731E for ; Tue, 2 Oct 2018 15:46:20 +0200 (CEST) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by relay.uni-heidelberg.de (8.15.2/8.15.2) with ESMTPS id w92DkDQa032629 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 2 Oct 2018 15:46:15 +0200 Received: by mail-ed1-f47.google.com with SMTP id n2-v6so2097532edo.9 for ; Tue, 02 Oct 2018 06:46:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=Rim+U8S+Qkg0PwM57NLyb8RKV+WIN8BAH6FgZrWuEpM=; b=qXZp/0iKYLLYoji8tq3TWEJ62Ne9F2ew8CKt3dBzPVolGNOdyUaZRdOJAFpMeelbHk 4tEYvFZ8Hr64n1Yvnffl1eq1/p562xCKh4BddTnupbnDtRQtY0fkm3xq03B2vG0+7V9T +3Xl/Y/uERiXGTAinyPEUFlYIJgz7qDXpV0NQ2dqHWvsiH8s6gSoU9BtbX91hlmyF94+ Xq5jDaWzpgrDY5cJZbcT1U98A006Zvpdx/44ier+x8rGpvQpEiiLNFPhFotl063MxJc2 V5sCWeuwMasgVLBSAn/j8AAnXy+q0BTLLtlEZ4E0N1Z/C8b6nilZ17PJYSKtqHJEw3xb OxPQ== X-Gm-Message-State: ABuFfohpUTyI9KWKNzHLDOLpYRb2UW+3OGdgcjPNRPAna12CDcRb/PKw Nkufu2YyqgPsK0KdL42jSanqdOAxnic= X-Google-Smtp-Source: ACcGV63PHel1p8WDuwRV/hNi3Hm3TWYMaXOXPDEKIAxNiq1jzvK7ype9ExO2ZCgC9Z8+bejyG0mWEA== X-Received: by 2002:a50:aad8:: with SMTP id r24-v6mr13000444edc.64.1538487972798; Tue, 02 Oct 2018 06:46:12 -0700 (PDT) Received: from ?IPv6:2a05:1141:1f6:5b00:49f:1052:b5de:54d4? ([2a05:1141:1f6:5b00:49f:1052:b5de:54d4]) by smtp.gmail.com with ESMTPSA id s27-v6sm1437291ejm.2.2018.10.02.06.46.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 06:46:12 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) X-Mailer: Apple Mail (2.3445.100.39) Message-ID: Date: Tue, 2 Oct 2018 15:46:10 +0200 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Johannes Burtscher Subject: Function arguments vs "global" variables To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE 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:6Cee0qTmCBg=:hFdkV9GrdohPkjM+/hMYqeMRIh JOR7CNhjuDYs40eEAVUzqcDJB9ipV9VW2o36wHChwaVp+0Nmm0ZxdUR+t0Jm0Y9X1nszM10Mp CPRObwPVqmOfELOjiPjos22Fz8n/ZHmE2ZIOPc6/T21hadT3Vcm/JPlLfevByMW2MA5Jr1QMh N+RGNOBqYzhbjhch3k6AsBY6096YfiV4CV9lnvul7a+vkIxk/VFYXvxsBwhwHF6MzADUCfou3 VGzKocbL/vQJ29i1nHq3/1Bf5XHUPBLgnpxRCB90SMVBODKiGN1XFPjWz3dDP73RmkMtRjHch AzP9u4mN38XfPkcyecx2Uwz66OE8Myq160s1TYKREKXCGSBWVwfJOPILV72sDjMNKYYfdHWCQ As1058rmylkMQWKL93abrOue6BzzRlUm04Rf7pNhq20BdzhAQ6ZY3XlOZuDdMEXYnuAM9WdYY /HqvON57mzsWsM3Vl0fJxp9ZryoXniy6KLma9zIpWdMpv2I34Av2+5kFVqtaxCUh4bb4ot+Fx s/tSi5TTVEwxrZ4qv39cxQ6ciIoTPm4Rhg+mFFTEPP6eY51LI1/ygVZ/+WiaBxuhVrQwMMfH1 f3zFcjeat6FubxXvnuzGDwmiFA5f7rm/YcawPUCYpJlp3bu+FnmIwgoOSsi2M7TLZAFE0qDIL FKmW5388rcfnlshvtCtPXf9UgT1XIC/EpgO/Mr+hCRqqKk+ErKVltXb9vZz+5jma33IPyUroZ cifYV3Y1zf4fItp1p5XtyACXE2KpLFzh/esSSLjuxRlB6ARMcp1YJ3Ki8SS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JAHBynUF500LGI/aiQwpAN7SJ1/b6tc38JYDTv JvaDpKBJ/fl7XNhQ5WxNjHF8sIlniE2Mvnp5KxLALrOLxUg6ljhwIaN4P4dASkLJiheH+/uG1 q+HDVpu9mS6g39iTE6lKfZV8BgOSU6hwtj2p91shtGLkiO6XmhsHoXbtFlGng5evPfX9h+rDs oMoV10AELXc3CKPINCBjY= X-UI-Loop:V01:l9gcrlJFIiI=:GBNbjcXY4GK8JW0OU1w+VXQx2oZC4Z2v/ZdUo4mGUnk= X-UI-Out-Filterresults: notjunk:1;V01:K0:qT4B1BHlJr4=:JZXjI8yDHJ5zK4P5Hu8yQw 9L7qOYe582en7d/2n+7dIHxVYFVgBff1i6hY6qrcHN3guD5L6FJCc+13JOr9FCiE5r4Vjkebk ODSJe8hfOk+VTPYcFCs0pQosQtlfMztl4eH9jiR2Nc8i8H32UOjQj0tsF25hcNsY8aZEOCMun kGswRkRLFi/CcDXUYrTRLs+oW1tNeXXzLtOVspGtbwvVqUAVbXMzBfZ9FIOnx/NDXXGRIeeKu 26wkxwL2UOgbezNSHhR/TeWj5+JmXtlbBbCJSwo+03oGTyV+gVAw1scQUK9p6h3pqvYCnuv/v ljFHZAwneYG6JVADkktBHixwWuMjmJBXwvzNGrPhGcAkdUfZ0QPBOrCBPvkYU749VPMjnWZ4g k6f/TJqvgStXp2FWMbeg4C6tWFGV5Mvsy75Qe5fnw39fzE7OamikLPvwyxlZm1DpXmYsiLJld 3nQVRNk0SIGTaIIV/s0XX1Kq/Df9M/Y= 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 w92GZ0gW021472 Status: R X-Status: X-Keywords: X-UID: 8087 Hi all, since TeX is actually a macro processor, I find it somewhat difficult to convert concepts from other languages to it. Currently I'm wondering about the following: let's say I have a function that takes some input, processes it and then hands the results off to some auxiliary functions. 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? \seq_new:N \l__jfa_my_seq \cs_new_protected:Nn \__jfa_func:n { \seq_set_split:Nnn \l__jfa_my_seq {/} {#1} \__jfa_func_aux:N \l__jfa_my_seq \__jfa_func_aux: } \cs_new_protected:Nn \__jfa_func_aux:N { \seq_show:N #1 } \cs_new_protected:Nn \__jfa_func_aux: { \seq_show:N \l__jfa_my_seq } In any other language I would clearly opt for the explicit argument just to avoid global variables but with TeX's scoping rules the situation seems to be fundamentally different. I (think I) know that it doesn't make any difference after all, but I would still like to know if one variant is preferred over the other and, if so, why. Best Johannes