| ▲ | softfalcon 7 hours ago | ||||||||||||||||
> Adding types on top of that isn't a protocol concern but an application-level one. I agree with this. I have had to handle raw byte streams at lower levels for a lot of use-cases (usually optimization, or when developing libs for special purposes). It is quite helpful to have the choice of how I handle the raw chunks of data that get queued up and out of the network layer to my application. Maybe this is because I do everything from C++ to Javascript, but I feel like the abstractions of cleanly getting a stream of byte arrays is already so many steps away from actual network packet retrieval, serializing, and parsing that I am a bit baffled folks want to abstract this concern away even more than we already do. I get it, we all have our focuses (and they're ever growing in Software these days), but maybe it's okay to still see some of the bits and bytes in our systems? | |||||||||||||||||
| ▲ | conartist6 6 hours ago | parent [-] | ||||||||||||||||
My concern isn't with how you write your network layer. Use buffers in there, of course. But what if you just want to do a simple decoding transform to get a stream of Unicode code points from a steam of bytes? If your definition of a stream is that it has UInt8 values, that simply isn't possible. And there's still gonna be waaay too many code points to fall back to an async iterator of code points. | |||||||||||||||||
| |||||||||||||||||