C++ Logo

sg16

Advanced search

P2146R0 - Modern std::byte stream IO for C++

From: Lyberta <lyberta_at_[hidden]>
Date: Thu, 26 Mar 2020 01:15:39 +0300
EDIT: Forgot to attach the actual paper. Oops.

This paper proposes fundamental IO concepts, customization points for serialization and deserialization and streams for memory
and file IO.

It should appear publicly in mid-April mailing.

This paper in particular focuses only on bytes, while providing minimalistic facilities for integers and floating point numbers.
There is no explicit text support. This is very intentional.

Tom voiced desire to discuss this paper in SG16 in the past so I'm posting it here to see if such discussion is necessary.

In my mental model, text streams on the high level should be viewed as sequences of Unicode scalar values so text IO layer would
not need to know the encoding. Internally, such streams would be viewed as sequences of code units. And only in case of going
outside such as during file or network IO, the byte layer that this paper proposes would be used.

IO contexts that are proposed here store endianness so it is reasonable to implement encoding schemes on top of this paper
without complicating encoding facilities. I.e. encoding facilities only need Unicode encoding forms and not encoding schemes.



Received on 2020-03-25 17:18:36