Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2576

Add "implies" operator for boolean expressions

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • syntax
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              daniel_sun Daniel Sun
              torda Tord Alenljung
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: