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

Make all operators interceptable

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 4.x
    • groovy-runtime
    • None

    Description

      Right now several operators (e.g. ! && || =~ ==~)¹ cannot be intercepted. Making all operators interceptable would improve language consistency and open up new possibilities for API/DSL designers. For an example of how this feature could be used, see http://www.nabble.com/Operator-Interception-tf3424475.html#a9544816

      ¹ Also < <= => > <=> cannot be intercepted. Intercepting compareTo() is not enough, because it doesn't tell which operator was used.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pniederw Peter Niederwieser
              Votes:
              9 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: