revelrylabs / elixir-nodejs

An Elixir API for calling Node.js functions
MIT License
214 stars 31 forks source link

Generators #49

Open madshargreave opened 4 years ago

madshargreave commented 4 years ago

I'm curious as to whether it's possible, and what it would take to support ES6 (async) generators.

I imagine we could support them through the stream APIs

oohnoitz commented 4 years ago

This would depend on how you expect the generators to work. Currently, we expect a single return value at the end of execution. If we wanted to actually use generators to the full extent this will need to have its own API and handle things a lot differently and there's a wide range of scenarios to consider as well.