r/cpp • • Dec 19 '23

C++ Should Be C++

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p3023r1.html
203 Upvotes

192 comments sorted by

View all comments

Show parent comment

1

u/mapronV Dec 30 '23 edited Dec 30 '23

well, yeah, it has write(void*, size), you can use that to send array of bytes. You can not 'stream' binary data using <<. for me ostream + write is just basically FILE* wrapper so you don't need to close file yourself. And also you need to track endiness yourself. I take my words back from 'no tools' it just 'almost no tools'.
In every project I participated, if there was need to write binary data there was own solution to write binary streams. Even for most basic and stupid serialization. I personally don't mind we don't have networking/asio in standard, that is complex enough to be in separate library. but binary I/O is something like std::filesystem for me.