this post was submitted on 18 Oct 2024
43 points (97.8% liked)

Programming

17392 readers
151 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 !webdev@programming.dev



founded 1 year ago
MODERATORS
 

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

all 5 comments
sorted by: hot top controversial new old
[–] sevon@lemmy.kde.social 34 points 3 weeks ago* (last edited 3 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.

[–] thingsiplay@beehaw.org 13 points 3 weeks ago

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

[–] lungdart@lemmy.ca 9 points 3 weeks ago (2 children)

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

[–] actually@lemmy.world 2 points 3 weeks ago