You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/05/20 07:03:00 UTC
[jira] [Updated] (GROOVY-2840) [PARROT] Support "not" for in and
instanceof
[ https://issues.apache.org/jira/browse/GROOVY-2840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King updated GROOVY-2840:
------------------------------
Summary: [PARROT] Support "not" for in and instanceof (was: Support "not" for in and instanceof )
> [PARROT] Support "not" for in and instanceof
> ---------------------------------------------
>
> Key: GROOVY-2840
> URL: https://issues.apache.org/jira/browse/GROOVY-2840
> Project: Groovy
> Issue Type: New Feature
> Components: syntax
> Affects Versions: 1.5.6, 1.6-beta-1
> Reporter: Mingfai Ma
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 2.6.0-alpha-1
>
>
> It would be nice if we could use:
> - (3 !in [2,3,4]) or (3 not in [2,3,4]) instead of (!(3 in [2,3,4]))
> - also for instanceof
> Remarks:
> - It doesn't look like a big issue if it's just "!(x in ['x'])", but when the line is longer and more complex and when use together with other parenthesis, skipping one pair of parenthesis means a lot in code clarity. It's just like in SQL, we can add a NOT to NOT LIKE or NOT IN.
> Reference: http://www.nabble.com/Groovy-syntax--API-enhancement-td16796998.html#a16810531
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)