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

Replace := with == for equality testing and use === for identity

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-1
    • lexer, parser
    • None

    Description

      Java supports == for equality primitive types. Right now == means identity in Groovy. This is so confusing when working with numbers in Groovy.

      So lets use

      = for assignment
      == for equality of all objects in Groovy
      === for identity

      Right now we're using := for equality and == for identity. So

      := turns to ==
      == turns to ===

      Attachments

        Activity

          People

            bob Bob Paulin
            jstrachan James Strachan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: