You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Marko A. Rodriguez (JIRA)" <ji...@apache.org> on 2015/10/19 21:11:27 UTC

[jira] [Closed] (TINKERPOP3-895) Use "as BinaryOperator" and remove GBinaryOperator

     [ https://issues.apache.org/jira/browse/TINKERPOP3-895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marko A. Rodriguez closed TINKERPOP3-895.
-----------------------------------------
    Resolution: Fixed

This was merged.

> Use "as BinaryOperator" and remove GBinaryOperator
> --------------------------------------------------
>
>                 Key: TINKERPOP3-895
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-895
>             Project: TinkerPop 3
>          Issue Type: Bug
>          Components: process
>    Affects Versions: 3.0.2-incubating
>            Reporter: Marko A. Rodriguez
>            Assignee: Marko A. Rodriguez
>             Fix For: 3.1.0-incubating
>
>
> 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:
> {code}
> sackSum = { a,b ->
>   [a[0] + b[0],a[1] + b[1]]
> } as BinaryOperator
> {code}
> 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}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)