Skip to content

Clarify instance language around decoders and encoders - #241

Merged
annevk merged 4 commits into
masterfrom
annevk/instance
Oct 26, 2020
Merged

annevk merged 4 commits into
masterfrom
annevk/instance

Conversation

@annevk

@annevk annevk commented Oct 23, 2020

Copy link
Copy Markdown
Member

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

Fixes #240.

r? @andreubotella


Preview | Diff

@andreubotella andreubotella left a comment

Copy link
Copy Markdown
Member

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.

Comment thread encoding.bs
@annevk

annevk commented Oct 26, 2020

Copy link
Copy Markdown
Member Author

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

@andreubotella andreubotella left a comment

Copy link
Copy Markdown
Member

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