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
Show All Mail Headers

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

Print Reply
Subject:
From:
Will Robertson <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Sun, 18 Sep 2011 19:16:59 +0930
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
On 18/09/2011, at 6:52 PM, Joseph Wright wrote:

> Part of the reasoning we had here is that \tl_new:Nn was being used
> almost entirely for declaring constants. We have a conceptually-separate
> \tl_const:Nn for that job.

Also, for variables that are not constant but may well be initialised with a default value, I personally find it a bit cleaner to have whatever mechanism that will be setting the variable later to also set the default. E.g. from 2e

\DeclareOption{foo}{\def\@foo{#1}}
\ExecuteOptions{foo=default} % rather than \def\@foo{default}

I know this isn't as efficient, but I think semantically it's a little clearer.


> I guess an
> alternative is to set up the code such that a stream which has been
> closed will give a suitable error message if one tries to use it.

I prefer this option; I think it's natural to want to write

\iow_new:N \g_foo_iow
...
\cs_new:Nn \foo_internal_something:n
  {
    \iow_open:Nn \g_foo_iow {#1.output}
    ...
    \iow_close:N
  }


-- Will

ATOM RSS1 RSS2