sed-devel
[Top][All Lists]
Advanced

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

Re: proposed features for branching logic + minimal implementation


From: Liam Quinlan
Subject: Re: proposed features for branching logic + minimal implementation
Date: Mon, 12 Oct 2020 01:14:02 -0400

 You're right, that also works (maybe "best current mechanism" was a bit of
a value judgement).
I developed the habit of using ':n;tn;' because I found it easier to read.
At first scan, especially focusing on possible code paths, encountering
'Tn' causes me to look for the 'n' label in order to understand where it's
going... and in a sense, 's/^//;Tn' lies about that. Hence, "put the label
next to it" became my preferred tactic.

Again though, the two 'j' commands are admittedly sugars; if the feeling is
that they're superfluous then no problem.  They were honestly an
afterthought after implementing the test address, which is the actual meat
of this proposal.
(even that I assumed would be too niche to bother offering, until I saw how
trivial the patch was.)

On Sun, Oct 11, 2020 at 11:00 AM Nora Platiel <nplatiel@gmx.us> wrote:

> Sorry for replying out-of-thread.
>
> > And at each [ clear condition ] step, the flag must be reset, or it will
> be
> > in unknown state.
> > As far as I'm aware, the best existing mechanism is currently ':n;tn;'.
>
> Just in case you haven't considered it, there is also:
> s/^//;T;
> Longer but doesn't require a label.
>


reply via email to

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