Details
Description
Consider supplying an "implies" operator, often denoted =>, for boolean expressions. Example:
if (itIsRaining => iAmUsingUmbrella) {
println 'I am dry'
}
itIsRaining => iAmUsingUmbrella is equivalent with !itIsRaining | iAmUsingUmbrella but the "implies" version is in many cases intutively more suitable.
Issue Links
- relates to
-
GROOVY-2756
create new user overwritable operator methods for <,==,>,<=,=>,<==>
-
an alternative for a=>b would be !a?:b. Still not as nice of course