DEV Community

Discussion on: Should a modern programming language assume a byte is 8-bits in size?

 
mortoray profile image
edA‑qa mort‑ora‑y

byte is the term that means this in C/C++, and historically is the correct term as well. It's only recently that it's become an alias for 8-bits. I don't think I'd like to introduce a new term.

Leaf will also have to have a sizeof that returns number of bits. I guess it won't be so unnatural to have mismatched values though, since you can use arbitrary bit sizes anyway:

  • sizeof(integer 7bit) = 1
  • sizeof(integer 8bit) = 1
  • sizeof(integer 9bit) = 2