sed-devel
[Top][All Lists]
Advanced

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

Re: understanding the T command


From: Nora Platiel
Subject: Re: understanding the T command
Date: Fri, 15 May 2020 21:38:26 +0200

Thank you for the quick reply and testing. I appreciate the explanation and the 
link to the relevant code.

The current implementation seems to guarantee that any t or T command leaves 
the "replaced" flag unset, *regardless* of whether the branch is taken or not.

This should be easy to document: just change "conditional branch was taken" to 
"conditional branch was reached/executed" or something like that.

"... conditional branch was taken" can be understood to say that a T command 
has no effect whatsoever on the "replaced" flag (if a T takes the branch, the 
flag is already unset, resetting it makes no difference).

I think the implemented behavior makes more sense. The documented behavior is 
more confusing (asymmetric: t act as a "reset point" but T doesn't), and error 
prone (less "reset points" means that there is a higher likelihood that older 
replacements come into play when they are not meant to).

It would be nice to know whether backward compatibility will be maintained, so 
that I can use the T command without worries.

Thanks.




reply via email to

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