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:
Fri, 21 Aug 2009 16:59:05 +0100
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
In-Reply-To:
Content-Type:
text/plain; charset=ISO-8859-1
From:
Joseph Wright <[log in to unmask]>
Parts/Attachments:
text/plain (37 lines)
Hello all,

One thing that hasn't been discussed thus far is the
\DeclareDocumentTemplateInterface and
\DeclareDocumentCommandImplementation idea.  I realised I'd not kept
these in xparse despite not really having a clear decision not to have
them, so have put them back at present.

The broad idea is that you can declare an interface then vary the
implementation independently. Although I like the idea, this is limited
to the case where both parts of the equation have the same number of
arguments. Hence there is not totally free variation (for example, if I
try to attach an interface with two arguments to an implementation
needing three, I'm asking for trouble).

Personally, I'm not sure we gain too much over simply being careful
about the code that is sent to \DeclareDocumentCommand. In my examples,
I've tended to keep things simple:

\DeclareDocumentCommand \foo { s o m } {
  \IfBooleanTF #1 {
    \foo_internal_with_star:nn {#2} {#3}
  }{
    \foo_internal_no_star:nn {#2} {#3}
  }
}

Even with \DeclareDocumentTemplateInterface, you still need to know that
#1 is a true/false argument, so I'm not convinced there is really too
much "uncoupling". So I'd be happier if we did not provide
\DeclareDocumentTemplateInterface /
\DeclareDocumentTemplateImplementation. How do others see this: I don't
want to break things for other people, so I'm not going to make this
change (deliberately) with out being sure it is agreed.
-- 
Joseph Wright

ATOM RSS1 RSS2