Open myitcv opened 1 year ago
What is the motivation for the change? I find that =~
goes along with other inequality operators such as <=
and >=
, though perhaps that analogy would argue in favor of ~=
.
What is the motivation for the change?
Thanks. I'm just in the process of creating the umbrella issues we referenced from Community Call #1, hence why some issues are a bit light on detail. I'll defer to @mpvl to flesh this out (and will add a section above to highlight that it's pending).
@seh, one big motivation is how ugly it is to use regexps in a pattern constraint with an alias:
[X= =~"regexp"]: T
I agree: That sure is ugly. I assume that you don’t like the transposed proposal any better:
[X= ~="regexp"]: T
I agree it would be better in the context of pattern constraint.
I also regularly forgot if it is =~
or ~=
when writing configs.
Logically I think =~
is the correct way as we also have !~
. Would be awkward to have ~=
and !~
.
Having ~
and !~
feels ok to me.
Currently (per the spec), the
=~
operator is defined as follows:This issue tracks changing that operator to instead be simply
~
, with the same definition.Motivation etc.
(to follow from @mpvl)