[ 
https://issues.apache.org/jira/browse/TINKERPOP3-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14980904#comment-14980904
 ] 

Marko A. Rodriguez commented on TINKERPOP3-888:
-----------------------------------------------

I just went to implement this and realized that its not as simple as it seems. 
(or at least we will have an n^2 method problem). {{property()}} is part of the 
mutation API updates we did for {{3.1.0}} which means that:

* key: {{String}}, {{T}}, or {{Traversal}}.
* value: {{Object}} or {{Traversal}}.

I don't think we want ever overload pair in the API. The JavaDoc says enough... 
I'll close this and if someone disagrees, please reopen with the argument. 

> GraphTraversal.property overloads
> ---------------------------------
>
>                 Key: TINKERPOP3-888
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-888
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.0.2-incubating
>            Reporter: Matt Frantz
>            Assignee: Marko A. Rodriguez
>            Priority: Minor
>              Labels: breaking
>             Fix For: 3.1.0-incubating
>
>
> To improve type safety in the {{property}} step, we should change the 
> interface from ...
> {noformat}
> property(VertexProperty.Cardinality cardinality, Object key, Object value, 
> Object...keyValues)
> property(Object key, Object value, Object...keyValues)
> {noformat}
> ... to ...
> {noformat}
> property(VertexProperty.Cardinality cardinality, String key, Object value, 
> Object...keyValues)
> property(String key, Object value, Object...keyValues)
> property(VertexProperty.Cardinality cardinality, T key, Object value, 
> Object...keyValues)
> property(String key, T value, Object...keyValues)
> {noformat}
> Specifically, this makes it explicit that keys may only be {{T}} or 
> {{String}} type. 
> This would  NOT address the lack of type safety in the variadic {{keyValues}} 
> list.
> This is a breaking change for application developers, since it makes the key 
> type more specific.  However, it does not restrict the actual values 
> supported, as key values that were not {{T}} or {{String}} would have been 
> rejected at runtime previously.



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

Reply via email to