Github user jorgebay commented on the issue:

    https://github.com/apache/tinkerpop/pull/450
  
    Thanks @PommeVerte for getting a first look at it so fast.
    
    About `list()` and `one()`:
    
    - `next()` is a method exposed by the [Iterator protocol][1] which in newer 
versions of Ecmascript are used by [generators][2]. It could be confusing for 
the users, as it could give the impression that it is iterable but it isn't, 
users might be misguided to use it in this way: `for (let vertex of g.V())` 
(doesn't work because iterator protocol is sync only). Other possible names 
besides `one(callback)`: `getNext(callback)`, `getFirst(callback)`, 
`first(callback)`, `single(callback)` .
    - `toList()` in JS sounded to me like a sync conversion method, ie: `const 
x = y.toList()`, so I went for leaving the `to` out: `list(callback)`, but 
maybe this is too personal...
    
    Regarding not including the driver:
    
    I think different `RemoteConnection` implementations could live outside of 
the TinkerPop repository (at least for now) as it would increase the complexity 
of the test harness inside TinkerPop.
    [gremlin-javascript client][3] already implements most of the logic of the 
driver for Node.js, it would be possible to repurpose it to be a GLV 
`RemoteConnection` implementation but it would only be valid for Node.js (4+?).
    
    
[1]:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols#iterator
    
[2]:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols#With_a_generator
    
[3]:https://github.com/jbmusso/gremlin-javascript/blob/master/src/GremlinClient.js


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to