TLDR.Chat

Proposal to Standardize Byte Size in C++ as 8 Bits

P3477R0There are exactly 8 bits in a byte ๐Ÿ”—

A proposal has been made to formally define a byte as consisting of exactly 8 bits in C++. This change reflects the current state of hardware and software, where 8-bit bytes are the norm. Existing standards, such as POSIX and recent C++ versions, support this definition. The document argues that maintaining compatibility with non-8-bit byte architectures adds unnecessary complexity to programming and confuses new developers. While some legacy systems still use non-8-bit bytes, the proposal questions their relevance to modern software development.

What is the main purpose of the proposal?

The proposal aims to formally define a byte as exactly 8 bits in C++, reflecting the current standard across most hardware and software.

Why is it important to standardize the byte size?

Standardizing the byte size simplifies programming and reduces confusion, as it eliminates the need to support outdated architectures that do not conform to the 8-bit byte model.

Are there still architectures that use non-8-bit bytes?

Yes, some legacy architectures still use non-8-bit bytes, but their relevance to modern C++ development is questioned in the proposal.

Related