groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] condition: OR of two string comparisons


From: Carsten Kunze
Subject: Re: [Groff] condition: OR of two string comparisons
Date: Fri, 21 Nov 2014 18:12:10 +0100 (CET)

Hi Ralph, 

> But new users to troff, and I think Peter's MOM can attract them, could
> well have been raised on C at best and Java at worst.  If we're to have
> them step beyond the friendly macro package into doing a bit of troff,
> getting involved, helping keep interest going, perhaps specialised
> macros or preprocessors, or adding troff backends to other tools, then a
> nicer syntax for control flow and expressions would lower the hurdle.

The new users might not start with creating macro packages like MM.
They would use an existing macro package to create a document.  The
best way to attract them is to create a comfortable macro package.
For every purpose for using such a macro package low level requests
like .if should not be necessary.  (I don't know MOM, maybe it is such
a comfortable environment for new users to create their documents.)

So all this discussion here has nothing to do with attraction of new users,
this can just be done by providing comfortable macros.  All this
discussion is exclusively for those who create or maintain macro packages.

> Here's a bit of mm picked because it uses a few `\{\'. [...]

This is an excellent argument against the new syntax.  Both macro syntaxes
look totally equal.  One looks at the statements and does not notice that \{\
is used here and { there.  Only one who doesn't know roff will notice this.

And:  Compatibility has been important for you.  So .} is not possible.  There
can't be an exception.  Else you would open doors for anything ....

> > If you don't like the basic design of the troff language, start from
> > scratch and write your own formatter using a complete redesign of the
> > syntax.
> 
> True.  But I'm happy with the basic design.  Macros, traps, inline
> escapes, all fine.  Much nicer to read than TeX.  And writing something
> of CSTR 54's quality is beyond me.  :-)

Lets say one would take Werners .if x suggestion.  Then you could write

.if x (...new syntax...) \{\
.   nr A x (...new syntax...)

Wouldn't that be sufficient?

Carsten



reply via email to

[Prev in Thread] Current Thread [Next in Thread]