LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 9 Sep 2008 17:50:52 +0200
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
8bit
In-Reply-To:
Content-Type:
text/plain; charset="iso-8859-1"
From:
"Mittelbach, Frank" <[log in to unmask]>
Parts/Attachments:
text/plain (32 lines)
Joseph,

philosophically tpls (token list pointers) have been invented precisely to be used to store data and not use "function definitions" for this (technically it uses \def:Npn of course, but it can for example do additional checks).

another way to look at it is to think about whether  "store_something" is used in a way of a variable or more in a way of a function call. I have had situations where I prefered to think of stored data as being stored in a function. For example in an interface for title page design, I had a bunch of functions (with arguments) and a bunch of functions without arguments (where where nothing else than storage bins really. But I treated them as functions because in the context of that interface it gave a uniform view rather than having some tings being variables and others being functions (with an argument) but essentially doing the same thing.

so it depends I would say, but normally data bins should be variables of type _tlp

frank


-----Ursprüngliche Nachricht-----
Von: Mailing list for the LaTeX3 project [mailto:[log in to unmask]] Im Auftrag von Joseph Wright
Gesendet: Dienstag, 9. September 2008 16:37
An: [log in to unmask]
Betreff: tlp type

Hello,

A "philosophy" question.  For storing values that will be used "as is", normally one would do \def\storesomething{Something}.  In the LaTeX3 model, I can choose either

\def:NNn \store_something: 0 {Something}

or

\tlp_new:N \l_store_something_tlp
\tlp_set:Nn \l_store_something_tlp {Something}

and get the same result, function-wise.  Is the later closer to the model proposed, or should I stick with the former?
--
Joseph Wright

ATOM RSS1 RSS2