>>>>> "LH" == Lars Hellström <[log in to unmask]> writes:
LH> At 11.07 +0200 2003-07-17, Joachim Schrod wrote:

LH> TeX missing elementary boolean clauses? They're not there as
LH> primitives, but they are not hard to define as macros.

And then comes your explanation:

    A "boolean expression" is something which in the mouth expands to 0 or 1.
    The following take boolean expressions as arguments and may themselves be
    used as boolean expressions.

    \def\boolean@not#1{\if#10\expandafter1\else\expandafter0\fi}
    \def\boolean@implies#1#2{\if#10\expandafter1\else#2\fi}
    \def\boolean@and#1#2{\ifnum #1#2>10 \expandafter1\else\expandafter0\fi}
    \def\boolean@or#1#2{\ifnum #1#2>\z@ \expandafter1\else\expandafter0\fi}

    (The \expandafter commands are not necessary, but they help a bit with
    cleaning things up.)

    The tricky part is of course that not everything one might want to test
    (such as the existence of a file) can be done entirely with TeX primitives
    that expand in the mouth, but that is another matter. The TeX macro
    language as such is both powerful and elegant, even though it is also
    rather bizarre, but on the other hand one can say the same about lambda
    calculus.

If you see this complicated explanation as appropriate for such simple
thing as boolean expressions, then we surely have different opinions
about appropriateness. But at least we seem to agree that TML is
rather bizarre; and the comparison to lambda calculus is a good one:
IMNSHO nobody wants to produce Real Systems(tm) in lambda calculus.


LH> Contrary to the opinions commonly raised on this list the last two
LH> week, I don't think the TeX macro language is the weakest part of
LH> TeX, even though it could certainly do with some extensions for
LH> LaTeX (in areas such as command argument processing, keyval-style
LH> value assignments, and calc-style arithmetic). It is not
LH> surprising however that it is the part that is giving the *ML
LH> people the most trouble, and that probably accounts for most of
LH> the "bad press" it has been given.

I disagree here. It doesn't give the *ML people any trouble, because
almost all of them give a sh*t about TeX, they (try to) design and
implement everything anew. Since they don't use it they have no
trouble with it. I haven't read TeX macro complaints from them at all,
where is the "bad press" you're talking about?

And, please don't make the error of counting me in. My writing about
the TeX Macro Language comes from 21 years experience of TeX
programming, and have nothing to do with XML or SGML. And I'm proud to
be a TeXie since 1982 -- I still like its markup syntax much more than
XML for several reasons that are really off topic here. I don't like
the way style sheets (i.e., typesetting specs implementations) for
this markup language are implemented, and think that both the TeX and
XML world have very large deficiencies in that matter. Talk to a book
designer -- and see the semantic distance from their mental models to
implementations in (La)TeX and XSLT/FOP. IMO a possible research
agenda would strive to close that gap with radical new approaches.

But that has nothing to do with LaTeX any more, so we should close the
discussion on this list RSN.


LH> If you want to look at a part of TeX that is _weak_, then consider
LH> alignments.

I know. If you'll ever come to a TeX conference, meet Chris Rowley and
myself there. We're discussing that topic since more than 10 years. No
practical solution in sight... ;-)


Cheers,
        Joachim

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Joachim Schrod                                  Email: [log in to unmask]
Roedermark, Germany

        ``How do we persuade new users that spreading fonts across the page
        like peanut butter across hot toast is not necessarily the route to
        typographic excellence?''                       -- Peter Flynn