Re: [whatwg/encoding] Add Streams support (#72)

> I'd really much prefer inheritance over GeneralTransformStream. This seems like something that should be a subclass, so we'd get any benefits added to transform streams.

Subclassing the "real" TransformStream would be difficult.

>From a spec point of view, we have to make WebIDL know about TransformStream. The simplest way I can think of would be to add a `[NonEnumerable]` extended attribute to WebIDL so that it can express the existing interface.

>From an implementation point of view, it's probably easy when TransformStream is implemented using IDL and difficult otherwise. In Chrome, the IDL parser knows nothing about TransformStream, so we'd have to either special-case it in the IDL bindings, reimplement TransformStream in C++, or implement TextDecoderStream without using IDL bindings at all.

>From a design point of view, inheritance of implementation has led to tight coupling and poor maintainability in code bases I have worked on and it's not a practice I want to encourage.

-- 
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/encoding/issues/72#issuecomment-393086795

Received on Wednesday, 30 May 2018 09:04:26 UTC