Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by h1439878.stratoserver.net (8.14.2/8.14.2/Debian-2build1) with ESMTP id r6GHwk78030348 for ; Tue, 16 Jul 2013 19:58:48 +0200 Received: from relay.uni-heidelberg.de ([129.206.100.212]) by mx-ha.gmx.net (mxgmx113) with ESMTP (Nemesis) id 0LpwqJ-1UTPja1RkF-00fhOX for ; Tue, 16 Jul 2013 19:58:41 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id r6GHuFBG032552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Jul 2013 19:56:15 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r6GHbvv2008273; Tue, 16 Jul 2013 19:56:14 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 10313801 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Tue, 16 Jul 2013 19:56:14 +0200 Received: from relay2.uni-heidelberg.de (relay2.uni-heidelberg.de [129.206.210.211]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r6GHuEl1020832 for ; Tue, 16 Jul 2013 19:56:14 +0200 Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id r6GHu5hQ028118 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=FAIL) for ; Tue, 16 Jul 2013 19:56:08 +0200 Received: by mail-pd0-f179.google.com with SMTP id q10so926945pdj.24 for ; Tue, 16 Jul 2013 10:56:04 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.68.138.225 with SMTP id qt1mr2685488pbb.83.1373997364576; Tue, 16 Jul 2013 10:56:04 -0700 (PDT) Received: by 10.66.150.226 with HTTP; Tue, 16 Jul 2013 10:56:04 -0700 (PDT) Content-Type: text/plain; charset=ISO-8859-1 Message-ID: Date: Tue, 16 Jul 2013 13:56:04 -0400 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: Bruno Le Floch Subject: Pointers [was: Request for argument specifiers which generate unique csnames] 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-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:NlW1uiZQ2cg=:QxGI3zi6pPZ90mmLx9S8vA cAqVUuKnR8ybPhxVnM8MzdKnqgdyqS4Lm6uL4cjs8l1vwm7pNIk7B9yymJ4FaPe/537FLgL Ohj32YtzzuZCOVCUKNTR8BdDk6boSVtVXbf2Cp4BdxdpAIt/qjXKn5a0ueQUmqirKt7MejN M9Yr2vdjXg1fQA/qSny5RJUOtS6zC+KhelfupDLxlDmQlziuJ/K68LuIjV5kYvGSK4OSnpx awGBuxy8hgBw1LP+7ajiaRnDVYgT9rkHs8MIsvEE2YuDqEie/5AAV8jfQNRgq5E8anoVcSt b+q7l9deYzyLJOGupb14x+xMfXzJE9GwEiqo6Fr5m0azIjZOdLbuVg81K3Q3tHeYV3zY4FY eEz7q5LyZ2kV5W9LxOritPUk5xIDV1lIZ8a+fTLZx5GlMgVBMBiXetBJzqZVVJ2qfgr1lyx q2bt6NN0x7DDqJweXIXdlFHm0JjiWvagOZeH7qP55hXUAeeRZAZpSrJMnMuWzdwfHLy4E7C soMq0BN4QeI/sh+0j4iloGYk79Q5upU0dTZdXQzYXXBVGuFdan/YWKLFoFba+slFqvSPOcK xLk1rNN1bMBkQjQlbJi+OlHhBFm4eQk6Scb2fZ+we83zu9rVxxR6hlY15Dhe7KED3IrqixB nd68pX8naRLiQrCYggh+trhq/DrAsNlbIDRF7bUAm/jUJrLun0Xbn6AO6kNN9duorM+bAyJ PrHCXA+sLdwkaSwfEilCkHGRIA06t2ML23h9I0LD5/HgVCMovSYhBfohjjDl46m3qoTGqpT mTmKfESGm8pXVwcBya5BeAT3un8YroUmoSio2D8Lh6m8Hf6r34Hu02v7VXmaO+mTCZ5BrPc T8UjYXXdK6onZozQ028iss2s4tglA/BEuox6IR6LNdmmStsjV/zg598e6lMXuJvv3FQt9oh UPdWysDkx0nao5KdrW1ekhMoz5S1mDW5p8HKhoQJI/ZSy9CQl/yAiSmO91OyDNvxFRfH5/b FKgFUQGndTUmdLcthAP9oTlm0tZ0jMAOQnHX15/RPyY0CjxRFt524IxWSDHAyAlpAk0SJ1v 9+DTCKOsuS8d1QYWs5VGvRwVTvje06qwKihrtHFR9gHQbHHWA6HASLnsGaTTGvAmt1i7YP3 Yyvo+tyImlpJRAqeEl2Sd7dJCxBFR246Y14AiGSnsfZyT74r5QjLCkDiHRGi7OW4mJmsmEC Q/WF45SD1vw84tc4FfVfe0ZotruwUzyVW1KBF3NfcSX3HjHEX9oW0IsLeG2hHnkIfDvfeyq 0tAwLiD6s/TeTQxILijzUvEojYUt2GmxhANpn6UudLydmTrtBdTqpDbAcbtu4SxQBZtGn/A /x8ZILPXEUdhyYKD4YNpCloiKAnYPa9zEIvpvFIVE3ZtuL6Wa0qtgrow+IGaDUsphxJoDhW fCsCtoZ2pNiw92IysyAw6qu1nyK7EcZaif/BmQGYp958VRFKLQ1qBqgmnnTEtSN5Z9FTqHS Qllx8HJDFziH2MvGyfX2ddDv0qtsDtfQ9NusXlI3pxT42M9Nad/MQ6N2j85D2bNlzX/fcn0 r6sBTAZKi468J5IR9fsiOQYvItLalL4nnZCYZOePQSmarWvruSSf9XihQJg= X-UI-Loop:V01:d01ECk908ZM=:XEZrpvCSU8p8tBc0pROSLM95Nt0MKf86TldW4kAJggQ= Status: R X-Status: X-Keywords: X-UID: 7247 Hello Michiel, As mentioned about the :U / :u proposal, adding an argument type is not a light decision to take. The :r proposal avoids one of the problems of :U and :u, since it does not perform assignments on its input. Just like :x, :r only performs assignments to internal variables. The slight issue I see is that acting with :r several times on the same argument gives different values, but that is not crucial, as those different values do not play any role. Actually, this slight issue hints at a memory leak waiting to happen: TeX will never be able to know when all mentions of the unique name are gone, hence that name (and the associated contents) will need to remain forever. This does not seem very safe. Ignoring this for now, I think the main argument against it is that given that it is not expandable, it can easily be emulated with (non-expandable) functions in a two-step process: instead of \foo:r { ab\cd }, one can have \tl_set:Nn \l__some_unique_name_tl { ab\cd } \foo:n { l__some_unique_name_tl } or using a function to create a unique identifier, \unique: \tl_set:cn { \l_unique_tl } { ab\cd } \foo:V \l_unique_tl or one could write a package providing \pointer_arg:Nn (or something similar) \pointer_arg:Nn \foo:n { ab\cd } In all cases, there needs to be a way to free names once they are not used anymore. Also, in most cases (if not all cases) I find it better to decide on a name of a variable in which to store the data, rather than relying on automatic generation of variables. If many such variables are needed, then perhaps a property list or other structured data structure is needed, and we can discuss that too. Thoughts? Regards, Bruno