whatwg/streams — pull request #233 by domenic (2014-10-16 20:48:12+00:00)
Title: Document default strategies

Would like feedback on this. See it at https://streams.spec.whatwg.org/branch-snapshots/default-strategies/#default-rs-strategy

In writing this, the approach ended up feeling kind of silly. To quote myself,

> The existence of an independent object for the default readable stream queuing strategy is not actually observable. Thus, implementations could implement this default strategy by other means, e.g. by incorporating the default logic into the readable stream algorithms themselves.

Maybe we should just do this in the spec? That is, instead of saying in the constructor "if no strategy is provided, set `this@[[strategy]]` to %DefaultReadableStreamStrategy%" and later just dispatching polymorphically to `this@[[strategy]]`, we should instead branch at each point `this@[[strategy]]` is used, and do the default behavior if `this@[[strategy]]` is `undefined`? There are only two places that `this@[[strategy]]` is used so it wouldn't be hard.

Would be curious what approach people think is clearer/easier to read/etc.