D made a great leap forward with the following: 1. bytes are 8 bits 2. shorts are 16 bits 3. ints are 32 bits 4. longs are 64 bits 5. arithmetic is 2's complement 6. IEEE floating point and a big chunk of wasted time trying to abstract these away and getting it wrong anyway was saved. Millions of people cried out in relief! Oh, and Unicode was the character set. Not EBCDIC, RADIX-50, etc.
"1. bytes are 8 bits" How big is a bit?
C++ proposal: There are exactly 8 bits in a byte
241–250 of 357 posts
Re: C++ proposal: There are exactly 8 bits in a byte
#242D made a great leap forward with the following: 1. bytes are 8 bits 2. shorts are 16 bits 3. ints are 32 bits 4. longs are 64 bits 5. arithmetic is 2's complement 6. IEEE floating point and a big chunk of wasted time trying to abstract these away and getting it wrong anyway was saved. Millions of people cried out in relief! Oh, and Unicode was the character set. Not EBCDIC, RADIX-50, etc.
Yeah, this is something Java got right as well. It got "unsigned" wrong, but it got standardizing primitive bits correct byte = 8 bits short = 16 int = 32 long = 64 float = 32 bit IEEE double = 64 bit IEEE
"For me as a language designer, which I don't really count myself as these days, what "simple" really ended up meaning was could I expect J. Random Developer to hold the spec in his head. That definition says that, for instance, Java isn't -- and in fact a lot of these languages end up with a lot of corner cases, things that nobody really understands. Quiz any C developer about unsigned, and pretty soon you discover that almost no C developers actually understand what goes on with unsigned, what unsigned arithmetic is. Things like that made C complex. The language part of Java is, I think, pretty simple. The libraries you have to look up."
Re: C++ proposal: There are exactly 8 bits in a byte
#243Earlier quoted context omitted.
I wrote code on a DECSYSTEM-20, the C compiler was not officially supported. It had a 36-bit word and a 7-bit byte. Yep, when you packed bytes into a word there were bits left over. And I was tasked with reading a tape with binary data in 8-bit format. Hilarity ensued.
Hah. Why did they do that?
8 bit tape? Probably the format the hardware worked in... not actually sure I haven't used real tapes but it's plausible.
36 bit per word computer? Sometimes 0..~4Billion isn't enough. 4 more bits would get someone to 64 billion, or +/- 32 billion.
As it turns out, my guess was ALMOST correct
https://en.wikipedia.org/wiki/36-bit_computing
Paraphrasing, legacy keying systems were based on records of up to 10 printed decimal digits of accuracy for input. 35 bits would be required to match the +/- input but 36 works better as a machine word and operations on 6 x 6 bit (yuck?) characters; or some 'smaller' machines which used a 36 bit larger word and 12 or 18 bit small words. Why the yuck? That's only 64 characters total, so these systems only supported UPPERCASE ALWAYS numeric digits and some other characters.
Re: C++ proposal: There are exactly 8 bits in a byte
#244Is C++ capable of deprecating or simplifying anything? Honest question, haven't followed closely. rand() is broken,I;m told unfixable and last I heard still wasn't deprecated. Is this proposal a test? "Can we even drop support for a solution to a problem literally nobody has?"
Exception specifications have been removed, although some want them back for value type exceptions, if that ever happens.
auto_ptr has been removed, given its broken design.
Now on the simplying side, not really, as the old ways still need to be understood.
Re: C++ proposal: There are exactly 8 bits in a byte
#245Is C++ capable of deprecating or simplifying anything? Honest question, haven't followed closely. rand() is broken,I;m told unfixable and last I heard still wasn't deprecated. Is this proposal a test? "Can we even drop support for a solution to a problem literally nobody has?"
C++ long ago crossed the line where making any change is more work than any benefit it could ever create.
Re: C++ proposal: There are exactly 8 bits in a byte
#246Earlier quoted context omitted.
Do UNIVACs care about modern C++ compilers? Do modern C++ compilers care about UNIVACs? Given that Wikipedia says UNIVAC was discontinued in 1986 I’m pretty sure the answer is no and no!
The UNIVAC 1108 (and descendants) mainframe architecture was not discontinued in 1986. The company that owned it (Sperry) merged with Burroughs in that year to form Unisys. The platform still exists, but now runs as a software emulator under x86-64. The OS is still maintained and had a new release just last year. Around the time of the merger the old school name “UNIVAC” was retired in a rebranding, but the platform…
https://en.wikipedia.org/wiki/Unisys_OS_2200_programming_lan...
Re: C++ proposal: There are exactly 8 bits in a byte
#247As consolation, big-endian will likely live on forever as the network byte order.
Re: C++ proposal: There are exactly 8 bits in a byte
#248Earlier quoted context omitted.
Maybe specifying that floats are always IEEE floats should be next? Though that would obsolete this Linux kernel classic so maybe not. https://github.com/torvalds/linux/blob/master/include/math-e...
I was curious about float16, and TIL that the 2008 revision of the standard includes it as an interchange format: https://en.wikipedia.org/wiki/IEEE_754-2008_revision
Re: C++ proposal: There are exactly 8 bits in a byte
#249D made a great leap forward with the following: 1. bytes are 8 bits 2. shorts are 16 bits 3. ints are 32 bits 4. longs are 64 bits 5. arithmetic is 2's complement 6. IEEE floating point and a big chunk of wasted time trying to abstract these away and getting it wrong anyway was saved. Millions of people cried out in relief! Oh, and Unicode was the character set. Not EBCDIC, RADIX-50, etc.
"1. bytes are 8 bits" How big is a bit?
Re: C++ proposal: There are exactly 8 bits in a byte
#250Is C++ capable of deprecating or simplifying anything? Honest question, haven't followed closely. rand() is broken,I;m told unfixable and last I heard still wasn't deprecated. Is this proposal a test? "Can we even drop support for a solution to a problem literally nobody has?"
Don't worry, most people complaining about C++ complexity don't.