LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Mon, 20 Sep 2010 15:57:37 +0200
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=iso-8859-1
From: Frank Mittelbach <[log in to unmask]>
Parts/Attachments: text/plain (32 lines)
Will Robertson writes:
 > On 20/09/2010, at 7:58 PM, Will Robertson wrote:
 > 
 > > On 20/09/2010, at 6:39 PM, Lars Hellström wrote:
 > > 
 > >> \bool_and_p:nn{<predicate 1>}{<predicate 2>}
 > >> \bool_or_p:nn {<predicate 1>}{<predicate 2>}
 > >> \bool_and_p:nnn{<predicate 1>}{<predicate 2>}{<predicate 3>}
 > >> \bool_or_p:nnn {<predicate 1>}{<predicate 2>}{<predicate 3>}
 > >> ...
 > >> 
 > >> for as long as one likes to continue that list.
 > > 
 > > It would be straightforward to add these to the syntax; there's already \bool_not_p:n and \bool_xor_p:nn.
 > 
 > I've just implemented these "and" and "or" functions (with :nnnn variants
 > as well); any objections to adding them to the expl3 code?

is there actually any need for the :nnn etc versions?

I tend to prefer the lisp like versions too ...not because I find them much
more readable :-) but because I still have a suspicion that the inline coding
has a performance hit (which is most likely not the case as they are coded by
Morten, but there you are).

Having said that, one more comment, while || and &&  can be reasonably mixed
within conditions it is still true that there is at least one bug in there
with regards to combination with negation
(see test file m3prg003.lvt at the end)

frank

ATOM RSS1 RSS2