eric-milles commented on pull request #1558:
URL: https://github.com/apache/groovy/pull/1558#issuecomment-818271807


   `and` and `or` work because they are binary operations so you can write "if 
(a.and(b))".  `not` is a unary operation semantically.  So the way you have it 
you could have "if (a.not())".  Are you looking for "if (not(a))"?  For that, 
you could supply a DGM like this:
   ```java
   public static Boolean not(Object self, Boolean target)
   ```
   With this, you could write "if (not(a))" and "self" would the the object 
that is the implicit "this", which you can ignore.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to