[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
https://golang.org/ref/spec#For_statements 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.
- Re: [Groff] condition: OR of two string comparisons, (continued)
- Re: [Groff] condition: OR of two string comparisons, Carsten Kunze, 2014/11/13
- Re: [Groff] condition: OR of two string comparisons, Steffen Nurpmeso, 2014/11/13
- Re: [Groff] condition: OR of two string comparisons, Denis M. Wilson, 2014/11/13
- Re: [Groff] condition: OR of two string comparisons, Ralph Corderoy, 2014/11/14
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Ralph Corderoy, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Steffen Nurpmeso, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Carsten Kunze, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, hohe72, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons,
Ralph Corderoy <=
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, Denis M. Wilson, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/19
- Re: [Groff] condition: OR of two string comparisons, Ralph Corderoy, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, Werner LEMBERG, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, hohe72, 2014/11/15
- Re: [Groff] condition: OR of two string comparisons, Tadziu Hoffmann, 2014/11/16
- Re: [Groff] condition: OR of two string comparisons, James K. Lowden, 2014/11/16
- Re: [Groff] condition: OR of two string comparisons, Tadziu Hoffmann, 2014/11/17
- Re: [Groff] condition: OR of two string comparisons, Carsten Kunze, 2014/11/17