[streams] ReadableByteStream underlying source/controller design: return a promise vs. c.something (#354)

The current draft has underlying byte sources defined like

```js
new ReadableByteStream({
  pull(c) {
    c.resolve(aChunk);
  }
});
```

Assuming we don't add the ability to enqueue multiple chunks, it would be better to return a promise for a chunk, since then it would fit better with other promise-using APIs. However, in Tokyo in person @tyoshino and I discussed this and we found a case where that does not work well. We need to remember and write down what that case was.

Assuming we keep the `c.resolve(aChunk)` design, `resolve` is not the best name, as promises are more an implementation detail; the developer should be thinking about streams and reads and pulls instead. Looking through a thesaurus, here are some options: answer, conclude, fill, finish, satisfy, produce, complete, finalize, respond.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/354

Received on Sunday, 3 May 2015 19:00:28 UTC