Re: [whatwg/encoding] Rename Encoding's "streams" to "token queues" (#215)

> I'm not sure I understand not needing wait.

Wait is only used so that the encoding and MIME sniffing algorithms can work on a delimited prefix of the consumable list as if it were a byte sequence. But IIRC we discussed previously that the [conversions from a consumable list into a string or byte sequence](https://whatpr.org/encoding/215.html#ref-for-concept-stream%E2%91%A4) (implicit until this PR) would consume the entire list and block until an EOF was found, making "wait" useless. Instead, we should have a peek operation that would take a length, block until the list has that many items or an EOF, and return the prefix of the consumable list as a string or byte sequence.

But if strings and byte sequences are going to be defined as subtypes of list at some point in the future, maybe it'd be best to scrap those conversions and continue using consumable lists as strings and byte sequences.

-- 
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/pull/215#issuecomment-658836516

Received on Wednesday, 15 July 2020 15:39:36 UTC