You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by PommeVerte <gi...@git.apache.org> on 2016/10/05 15:29:13 UTC

[GitHub] tinkerpop issue #450: Javascript GLV

Github user PommeVerte commented on the issue:

    https://github.com/apache/tinkerpop/pull/450
  
    Nice PR @jorgebay 
    Can you elaborate on why you went for `list()` and `one()` rather than keeping the original method names of `toList()` and `next()`? I understand that they would still have to require callbacks but I guess the point I'm trying to make is that it would probably be better to stick to the original naming to stay consistent with gremlin documentation, and then document the variations in a JS GLV specific documentation. 
    So : 
    
    ```javascript
    g.V().hasLabel('software').toList((err, vertices) => { 
      vertices.forEach(console.log);
    });
    
    g.V().has('name','marko').next((err, vertex) => { 
      console.log(vertex.label); // person
    });
    ```
    
    Thoughts?
    
    Also, you mentioned not including the Driver because Javascript engines does not provide a standard IO library. What would your suggestion be here? Was that just an invitation for the community to figure out if we should use an existing library or write a new driver?
    Do you have any insight here in regards to something like [gremlin-javascript](https://github.com/jbmusso/gremlin-javascript)? (minus that it's not 
     ECMAScript5 native and doesn't currently support ByteCode). 
    
    Anyways, I think we would proceed to rewrite a minimal version for the GLV anyways. 
    
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---