[Interest] Interest Digest, Vol 79, Issue 19

Jason H jhihn at gmx.com
Thu Apr 26 10:27:59 CEST 2018


> Sent: Wednesday, April 25, 2018 at 5:48 PM
> From: "Thiago Macieira" <thiago.macieira at intel.com>
> To: interest at qt-project.org
> Subject: Re: [Interest] Interest Digest, Vol 79, Issue 19
>
> On Wednesday, 25 April 2018 06:53:26 PDT Roland Hughes wrote:
> > What I'm trying to tell you is there was and still is a legitimate
> > reason to have a QDataStream which can write big-endian. Don't just rip
> > it out. Make it some kind of settable boolean flag in the class. There
> > is no way to know just how many of these things are still out there and
> > are still being developed. Most were in the world of defense
> > contractor/military
> 
> I never claimed it isn't. In fact, there is a flag to set the endianness.
> 
> When I said "most machines are little-endian", I was referring to machines Qt 
> runs on and, therefore, would use QDataStream. The fact that the default is 
> big endian is short-sighted. It should default to little-endian.


Nah. Big endian is the way to go. Just because one company made little endian prevelant isn't good enough. Network byte order is big endian, and when looking at hex dumps, the bytes appear in the order that you expect to see them... Which is why I think the big endian deadline was chosen. You're sending data with QDataStream, network byte order is the right order. The bits keep getting more significant, right to left, rather than zig zagging right to left then over to the right for the next byte.



More information about the Interest mailing list