Re: [whatwg/streams] How much latitude should implementations have in looking up transformer.transform()? (#691)

I'm loathe to make the constructor design inconsistent between the three classes. On the other hand, it seems like a low-risk change to cache all the methods on all the constructors, so if this is important, I think we should do that.

It's a bit weird from a JS perspective IMO. If we're treating these things as methods, the usual syntax for method calling is `foo.bar()`, not `previouslySavedBar.call(foo)`. But few people will notice.

We don't want to go back to just treating them as functions, as that breaks cases like https://streams.spec.whatwg.org/#example-both.

It would bloat the size of each object a decent bit, e.g. ReadableStreamDefaultController would end up with three more internal slots to store start, pull, and cancel.

BTW I think the way you've stated this as a performance cliff between `new TransformStream()` and `new TransformStream({})` is not emphasizing the right thing. That's a very theoretical performance cliff. But the cliff is a real problem for the more realistic use cases you cite. Just a phrasing thing :).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/691#issuecomment-285520965

Received on Thursday, 9 March 2017 23:44:36 UTC