During an internship in 1986 I wrote C code for a machine with 10-bit bytes, the BBN C/70. It was a horrible experience, and the existence of the machine in the first place was due to a cosmic accident of the negative kind.
C++ proposal: There are exactly 8 bits in a byte
41–50 of 357 posts
Re: C++ proposal: There are exactly 8 bits in a byte
#42I'm totally fine with enforcing that int8_t == char == 8-bits, however I'm not sure about spreading the misconception that a byte is 8-bits. A byte with 8-bits is called an octet. At the same time, a `byte` is already an "alias" for `char` since C++17 anyway[1]. [1] https://en.cppreference.com/w/cpp/types/byte
std::cout << (int8_t)32 << std::endl; //should print 32 dang it
Re: C++ proposal: There are exactly 8 bits in a byte
#43Re: C++ proposal: There are exactly 8 bits in a byte
#44Re: C++ proposal: There are exactly 8 bits in a byte
#45Re: C++ proposal: There are exactly 8 bits in a byte
#46Re: C++ proposal: There are exactly 8 bits in a byte
#47https://thephd.dev/conformance-should-mean-something-fputc-a...
Me? I just dabble with documenting an unimplemented "50% more bits per byte than the competition!" 12-bit fantasy console of my own invention - replete with inventions such as "UTF-12" - for shits and giggles.
Re: C++ proposal: There are exactly 8 bits in a byte
#48Re: C++ proposal: There are exactly 8 bits in a byte
#49Re: C++ proposal: There are exactly 8 bits in a byte
#50I'm totally fine with enforcing that int8_t == char == 8-bits, however I'm not sure about spreading the misconception that a byte is 8-bits. A byte with 8-bits is called an octet. At the same time, a `byte` is already an "alias" for `char` since C++17 anyway[1]. [1] https://en.cppreference.com/w/cpp/types/byte
I, for one, hate that int8 == signed char. std::cout << (int8_t)32 << std::endl; //should print 32 dang it
std::cout
because there is no default operator<< defined.