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

ASF GitHub Bot commented on TINKERPOP-1489:
-------------------------------------------

Github user jorgebay commented on the issue:

    https://github.com/apache/tinkerpop/pull/450
  
    I've added some fixes during the past weeks.
    
    I'll try to summarize the open issues with this patch to try to unblock it:
    
    A) Currently, the javascript GLV exposes `list()` instead of `toList()`. As 
it takes a callback as a parameter, having the method start with a `toX()` 
didn't feel natural to me.
    Maybe it makes more sense to follow the existing naming (`toList()`). 
Exposing something uniform across all GLVs, whenever possible, can be more 
important (in the same way as Python GLV used mixedCase to be more close to 
gremlin).
    The same applies to `next()`. To avoid confusions, we could document that 
`traversal.next()` is not an iterator and returns the first result.
    
    B) Promise-based API.
    We can include a promise-based method overloads when supported by the js 
engine, like [proposed above][1]. We can do it now, before merging it or as a 
next step after merging.
    
    Can we try to reach a conclusion on these issues?
    After that I can send a draft documentation for `gremlin-variants.asciidoc`.
    
    I've been using the Javascript GLV for a while now and it feels good to 
have code completion for Traversal methods on the IDE!
    
    [1]: https://github.com/apache/tinkerpop/pull/450#issuecomment-252911095


> Provide a Javascript Gremlin Language Variant
> ---------------------------------------------
>
>                 Key: TINKERPOP-1489
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1489
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: language-variant
>            Reporter: Jorge Bay
>
> It would be nice to have a Javascript Gremlin Language Variant that could 
> work with any ES5 runtime, specially the ones that support 
> [CommonJs|http://requirejs.org/docs/commonjs.html], like Node.js.
> Nashorn, the engine shipped with JDK 8+, does not implement CommonJs but 
> provides [additional 
> extensions|https://wiki.openjdk.java.net/display/Nashorn/Nashorn+extensions] 
> making modular JavaScript possible. Nashorn should be supported in order to 
> run glv tests under the same infrastructure (JDK8).



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

Reply via email to