Clarify instance language around decoders and encoders#241
Conversation
And also stop defaulting error mode in "run" and "process". Fixes #240.
andreubotella
left a comment
There was a problem hiding this comment.
You're missing "an instance of" in UTF-8 decode without BOM or fail. Also in TextDecoderCommon's "decoder" and TextEncoderStream's "encoder" associated fields.
I'd also add some clarification on the fact that encoders and decoders are abstract and their state goes on instances:
Each encoding has an associated decoder and most of them have an associated encoder. Encoders and decoders are stateless, but they can be used to create instances which might have state, and which have a handler algorithm.
|
I guess the one thing this does not address is that where we define decoders and encoders we do not spell out "instance" at the moment. We could, but I'd like to tackle that separately I think. |
andreubotella
left a comment
There was a problem hiding this comment.
The note to "encode or fail" has "keep an encoder alive" and "supplying the same encoder".
The domintros also have language like "running encoding's decoder", but since "running" isn't linked to the algorithm (see #245) and encoder/decoder instances can be seen as equivalent to a generator, I guess that's fine.
Other than that, LGTM.
And also stop defaulting error mode in "run" and "process".
Fixes #240.
r? @andreubotella
Preview | Diff