Endianness.md: "Avoid endianness whenever possible"
Avoid endianness whenever possible.
It is not clear what do you mean here.
Not a great wording, I agree.
I think it means to write code without the need of relying on network or machine native endianness. Would be a great recommendation, but it's not really easy to just not deal with any type of binary data.
It is a general design recommendation to avoid meddling with endianness. For example, to choose a textual exchange/serialization format instead of a binary format.
If you need to store numerical data, it's recommended to use an established serialization library like Protocol Buffers or FlatBuffers, instead of using a custom binary format.
I think we can mention using text representation or using protobuf and flatbuffers in the docs then? These two are good examples of serialization libraries for C/C++.
I do not think we should recommend any particular binary protocol - they come and go.
The predef pages are intended for developers who implement the protocols, not the developers who use the protocols.
The recommendation in question is intended as a sanity check before you start implementing code that depends on endianness.
I agree with @breese.
Yes, I agree too.
Should this be closed then?