3 ms·
> But when they bemoan using C they seem to misunderstand exactly how big a leap forward C was from pure assembly programming. Just having portable code in the
by pjc50 2y ago
> But when they bemoan using C they seem to misunderstand exactly how big a leap forward C was from pure assembly programming. Just having portable code in the era of everybody having their own bespoke UNIX system (with their own processor architecture to match, of course!) was an absolute game changer. C is entrenched because it was an evolutionary leap in a landscape that was shifting by the day.
This is very true, but it's also like saying that magnetic tape was a great improvement over punch cards. It definitely was, but that was also a long time ago.
C portability always had a huge asterisk attached to it, which was that the language was not going to help you at all with this, nor was it even going to define basic semantics for anything. It was a long time before it defined arithmetic as two's complement, which was bad news for anyone retrocomputing on a ones-complement machine but while you could compile code designed for one on the other there was no guarantee that it would actually work.
People built portability systems on top of this such as autoconf.
> Retro computing has taught me that people weren't nearly as "clueless" or "incompetent" as they're derided for these days. These were smart people making the best decisions they could at the time with what they had available.
I don't think the Rust movement thinks that Kernighan and Richie were incompetent. I've never seen anyone say that directly. What they do argue is that new information is available and circumstances have changed which means that some decisions which may have been reasonable are no longer adequate.
And this is not new information! One of the books I learned C from was "C Traps and Pitfalls", by Andrew Koenig .. in 1989. The Morris Worm was 1988.
While old software often had higher standards for shipping reliability, because you couldn't simply update it over the Internet (or at all on cartridges!), security was not at the same standard because it is much harder to achieve.
(There is also what I might call the "we were always against C" faction: people who, even in the 80s, were using LISP or Pascal (1970) or Modula-3 (1988))
- kazinator 2y agoRust portability is to have types like i16, i32 and i64, which is a trick that C programmers have used for decades to dodge real portability. The first machine that see right on didn't even have 16 bit types. The int type was 18 bits. Modern C does not guarantee that the inttypes.h header will make available int16_t or any of the other exact width types. Real portability means not knowing exactly how wide the types is yet making your code work anyway.
- kazinator 2y agos/see right on/C ran on/