Skip to content

Comments

Clarify instance language around decoders and encoders#241

Merged
annevk merged 4 commits intomasterfrom
annevk/instance
Oct 26, 2020
Merged

Clarify instance language around decoders and encoders#241
annevk merged 4 commits intomasterfrom
annevk/instance

Conversation

@annevk
Copy link
Member

@annevk annevk commented Oct 23, 2020

And also stop defaulting error mode in "run" and "process".

Fixes #240.

r? @andreubotella


Preview | Diff

Copy link
Member

@andreubotella andreubotella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@annevk
Copy link
Member Author

annevk commented Oct 26, 2020

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.

@annevk annevk requested a review from andreubotella October 26, 2020 14:40
Copy link
Member

@andreubotella andreubotella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@annevk annevk merged commit 47a3e55 into master Oct 26, 2020
@annevk annevk deleted the annevk/instance branch October 26, 2020 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Talk about instances of decoders and encoders

2 participants