[
https://issues.apache.org/jira/browse/GROOVY-5773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-5773:
--------------------------------
Description: In Groovy if you see x==\~y and x == \~y you can can get a
problem, because it is easy to oversee the space in between, changing the
meaning of the compare. The problem is toped by x != \~y being the negation of
x == \~y, but there is no negation for ==\~. This issue is therefore asking for
a replacement of the operators ==\~ and =\~ in a way that allows the negation
too and is still readable. For this no unary operator symbol should follow the
equals if equals is kept. (was: In Groovy if you see x==~y and x == ~y you can
can get a problem, because it is easy to oversee the space in between, changing
the meaning of the compare. The problem is toped by x != ~y being the negation
of x == ~y, but there is no negation for ==~. This issue is therefore asking
for a replacement of the operators ==~ and =~ in a way that allows the negation
too and is still readable. For this no unary operator symbol should follow the
equals if equals is kept.)
> Problem distinguishing !=~ and != ~ plus similiar ones
> -------------------------------------------------------
>
> Key: GROOVY-5773
> URL: https://issues.apache.org/jira/browse/GROOVY-5773
> Project: Groovy
> Issue Type: Improvement
> Components: parser, parser-antlr2, syntax
> Reporter: Jochen Theodorou
> Priority: Major
> Fix For: 4.x
>
>
> In Groovy if you see x==\~y and x == \~y you can can get a problem, because
> it is easy to oversee the space in between, changing the meaning of the
> compare. The problem is toped by x != \~y being the negation of x == \~y, but
> there is no negation for ==\~. This issue is therefore asking for a
> replacement of the operators ==\~ and =\~ in a way that allows the negation
> too and is still readable. For this no unary operator symbol should follow
> the equals if equals is kept.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)