A lot of the helper variables in Okteta are named byte. No problem, as this is no keyword in C++. Instead the name for the type representing a single byte, that is eight bits today, is
char (are there any current machines, where this isn’t true?). So all byte arrays are treated as arrays of
QByteArray, which also operates on char.
When implementing a rotation filter I used
byte >> width. And wondered why this didn’t yield the expected results. Looking at them more closely (of course one can switch to the display of the binary values in Okteta) it triggered that what I see is an arithmetic right shift (which happily adds a leading 1 again, if the unshifted byte had there one, to keep it a negative value. Sure, I knew about this before. But it’s nothing that I have present in my mind. Why should it be?
After all… what do names mean? What should I think of, if I hear “unsigned character”?
Oh, those legacy. I want ++++C, sometime.