Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-895

Use "as BinaryOperator" and remove GBinaryOperator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.2-incubating
    • 3.1.0-incubating
    • process
    • None

    Description

      In Gremlin-Groovy we have function wrappers like GSupplier, GFunction, GBinaryOperator, etc. which I use to wrap closures so that GraphTraversal methods know what the closure represents. I just learned you can do this:

      sackSum = { a,b ->
        [a[0] + b[0],a[1] + b[1]]
      } as BinaryOperator
      

      WOW! That is a huge saving in terms of code management.

      This is breaking if people are using GXXX for something, however, with as XXX, they shouldn't be using GXXX.

      Attachments

        Activity

          People

            okram Marko A. Rodriguez
            okram Marko A. Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: