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

Use "as BinaryOperator" and remove GBinaryOperator

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.2-incubating
    • Fix Version/s: 3.1.0-incubating
    • Component/s: process
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: