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/14 02:42:05 UTC
[jira] [Comment Edited] (TINKERPOP3-850) Reduce Graph.addVertex
overload ambiguity
[ https://issues.apache.org/jira/browse/TINKERPOP3-850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14956038#comment-14956038 ]
Marko A. Rodriguez edited comment on TINKERPOP3-850 at 10/14/15 12:41 AM:
--------------------------------------------------------------------------
[~mhfrantz] Can you explain why this is necessary again, please? This is regarding my NOTE on my VOTE. How did Gremlin-Scala work before? We have lots of {{vararg...}} methods through TinkerPop3. Is this just a rabbit hole we go down to change all those up every time a Java language variant complains? I'd prefer not to have to make API design decisions because of languages that are not aligned with Java8. For instance, in Gremlin-Groovy, I make lots of work arounds in Groovy, not in Java to make things work. Thoughts?
was (Author: okram):
[~mhfrantz] Can you explain why this is necessary again, please? This is regarding my NOTE on my VOTE. How did Gremlin-Scala work before? We have lots of `vararg...` methods through TinkerPop3. Is this just a rabbit hole we go down to change all those up every time a Java language variant complains? I'd prefer not to have to make API design decisions because of languages that are aligned with Java8. For instance, in Gremlin-Groovy, I make lots of work arounds in Groovy, not in Java to make things work. Thoughts?
> Reduce Graph.addVertex overload ambiguity
> -----------------------------------------
>
> Key: TINKERPOP3-850
> URL: https://issues.apache.org/jira/browse/TINKERPOP3-850
> Project: TinkerPop 3
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.0.1-incubating
> Reporter: Matt Frantz
> Assignee: Matt Frantz
> Labels: breaking
> Fix For: 3.1.0-incubating
>
>
> Create the following overloads:
> {noformat}
> Vertex addVertex();
> Vertex addVertex(String label);
> Vertex addVertex(Object key, Object value, Object...keyValues);
> {noformat}
> This would avoid the 1-arg overload, since there is only one 1-arg variant. It also makes the key/value structure more obvious.
> BTW, the JavaDoc now says "...the odd numbered arguments are String property keys," so if we actually allow other types, that doc should be fixed.
> Motivated by this dicussion: https://groups.google.com/d/msgid/gremlin-users/eb2a451a-af66-48a1-989c-8021473647fc%40googlegroups.com
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)