Github user jorgebay commented on the issue:

    https://github.com/apache/tinkerpop/pull/450
  
    > Note that there is a proposal for adding async iterator to JavaScript.
    
    Nice! I wasn't aware of that, I really like the syntax!
    I think the destiny of `next()` for async ops is also linked to 
TINKERPOP-1490, how state is managed and implemented: there are 2 possible 
routes for async iteration:
    - We asynchronously submit the query on the first iteration and for the 
following iterations it just goes through the buffered results on the submitted 
query.
    - We implement some kind of server side paging.
    
    I think we can continue discussing this on TINKERPOP-1490.
    
    In any case, I agree that the best approach for Javascript would be to use 
the async iterator protocol like you propose +1.
    
    > [...] we could swap `var` for `let` and `const` unless we want to target 
earlier versions of Java8
    
    I targeted EcmaScript 5.1 because any modern js runtime supports it, 
including browsers. Making the js GLV portable can be an useful feature.
    Maybe we can revisit this topic when Nashorn has full ES2015 support (and 
probably more and more old runtimes will be deprecated).



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

Reply via email to