[Top][All Lists]

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

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

From: Ralph Corderoy
Subject: Re: [Groff] condition: OR of two string comparisons
Date: Sun, 16 Nov 2014 12:23:32 +0000

Hi Werner,

> > And .whilex?  If we've a new .ifx, which I think is a bit clunky,
> > maybe we should bear in mind having a .elif and .else too that don't
> > need the .ifx to be .iex.  (Or .elsif;  Python use elif, Perl elsif.
> > elsif at least sounds like `else if'.)
> I could live with that.  It's a set of four or five new commands,
> which I consider a minor issue.

Perhaps then .iff since it's still one syllable, sounds the same, and is
familiar from its mathematical meaning;  `if and only if'.  .whilex
could be .for instead, taking a leaf from which doesn't have a `while'
reserved word, but instead

    for { }                      Endless loop.
    for a > b { }                While loop.
    for i = 0; i < 42; i++ { }   Initialise, test, increment.

> But (E; expr) would cover only a minor subset of possible improvements
> – it would be still necessary to provide backwards compatibility.

Would it?  That form could reject backwards compatibility;  only new
format allowed, just as after .iff.  I don't see why old syntax has to
be handled if it currently makes no sense to use `E' after the `('.

> A new new `if' implementation, however, could assign the standard
> precendence values to operators, provide a richer set of operators,
> etc., etc.

Yep, that's where we want to end up.  Carefully thought out, familiar,
logical, not a dead end.

Cheers, Ralph.

reply via email to

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