r/programming • • May 01 '18

C Is Not a Low-level Language - ACM Queue

https://queue.acm.org/detail.cfm?id=3212479
152 Upvotes

303 comments sorted by

View all comments

Show parent comments

2

u/claytonkb May 01 '18

Opinionated about lots of things that you may want to implement in hardware differently, but cannot

I remember reading about an architecture that has 9-bit bytes (seriously!) and there was actually a port of cc to compile on that architecture. I think this is like trying to argue that we should be able to write English with the Greek alphabet. I mean, no one is stopping you, go ahead and do it. But don't expect the rest of us to follow suit. A byte is a byte. Deal with it.

Ditto for all the other (more or less arbitrary) standards that have been built along the way. Look at the QWERTY keyboard. It doesn't matter that it is sub-optimal compared to the best conceivable keyboard layout. It was so much better than not having a standard that its sub-optimality is irrelevant. It enabled new, more efficient modes of operation that would be unreachable without it. The same logic applies to many domains. Evolution doesn't need the best design, only a good enough design.

4

u/pdp10 May 03 '18

I remember reading about an architecture that has 9-bit bytes (seriously!)

I enjoy your incredulity.

The first few generations of full-capability binary computers typically had 36-bit words because the market wanted machines that could calculate to ten decimal digits. Most minicomputers used 18-bit or 12-bit word size to accomplish the same goals with more-modest hardware. Bytes were usually 9-bit, but text encoding were often packed into various 6-bit encodings for efficiency (this is why old machines USE ALL CAPITAL LETTERS -- there was no lowercase in their text encoding).

What really changed that was the 32-bit IBM System 360. It was possibly the first machine with a standard architecture that would be used to make many compatible models and for years to come. It was very ambitious and it succeeded. (It was also to have used ASCII text encoding, but that bit of ambition was a bridge too far in the end, and IBM's big and midrange business systems and other machines in that ecosystem use the Extended BCDIC encoding to this day.)

The first minis to use 8-bit bytes were the PDP-11 and competitor Data General Eclipse. The PDP-11 architecture was groundbreaking in as many ways as the System 360, and set the standards for many future machines. C arguably had a symbiotic relationship with this architecture.

1

u/[deleted] May 01 '18

I remember reading about an architecture that has 9-bit bytes (seriously!)

I remember working with devices that had 6 and 7-bit bytes. And what?

But don't expect the rest of us to follow suit. A byte is a byte. Deal with it.

A 9-bit byte is a tagged byte, for example. Of course I do not expect you to understand the advantages of tagged memory architectures.

You're overrating the value of standards.