this post was submitted on 18 Oct 2024
41 points (97.7% liked)

Programming

17313 readers
48 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

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

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 33 points 4 weeks ago* (last edited 4 weeks ago)

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.

[–] [email protected] 8 points 4 weeks ago (1 children)

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

[–] actually 2 points 4 weeks ago