2 ms·
I think the majority of binary integer data sent and received today is big endian. Calling it "legacy" seems like a stretch. People are still designing plenty o
by jzwinck 6y ago
I think the majority of binary integer data sent and received today is big endian. Calling it "legacy" seems like a stretch. People are still designing plenty of brand new protocols using big endian. When I encounter a little endian one I am pleasantly surprised, but it is still a surprise.
- viraptor 6y agoI wonder how much of that design is a conscious decision and how much is "we need to use common endianness, stuff's on the network, let's use network-endian"? If we didn't have the label of network byte order, would people default to little?
- smcameron 6y agoAnother point is, if you use big endian on the network, and native is little endian, then if you screw up and forget to do the conversion, you catch it because it breaks. If you use little endian for native and network and you screw up, you never catch it unless you run on a big endian machine. It's a way to ensure that you implemented the protocol correctly in an endian clean way. (Of course you could also reverse the sense of the macros during testing, I suppose.)