P3477R0: There are exactly 8 bits in a byte (wg21.link)
from Markaos@lemmy.one to programming@programming.dev on 18 Oct 13:19
https://lemmy.one/post/20275070

A new proposal for C/C++ to force bytes to be 8 bits wide

#programming

threaded - newest

sevon@lemmy.kde.social on 18 Oct 13:43 next collapse

I was vaguely aware that some ancient architectures had weird byte widths, but I did not know about this. Pretty interesting.

This paper cannot succeed without mentioning the PDP-10 (though noting that PDP-11 has 8-bit bytes), and the fact that some DSPs have 24-bit or 32-bit words treated as “bytes.” These architectures made sense in their era, where word sizes varied and the notion of a byte wasn’t standardized. Today, nearly every general-purpose and embedded system adheres to the 8-bit byte model. The question isn’t whether there are still architectures where bytes aren’t 8-bits (there are!) but whether these care about modern C++… and whether modern C++ cares about them.

lungdart@lemmy.ca on 18 Oct 13:58 next collapse

I can see this being a breaking change for some strange edge cases and (ab)uses.

[deleted] on 18 Oct 15:38 next collapse

.

actually@lemmy.world on 18 Oct 18:39 collapse

Parity bit

thingsiplay@beehaw.org on 18 Oct 15:33 collapse

I knew it! I always had this gut feeling that a byte has 8 bits. /s