5 ms·
This completely misses the key factor: (most) computers were not big or fast enough to run high level languages back then. So for people who only got to use sma
by dboreham 10y ago
This completely misses the key factor: (most) computers were not big or fast enough to run high level languages back then. So for people who only got to use small computers, they had to code in assembler (or cross-compile on a big computer).
So anyone who could come up with a high(er) level language that would run on smaller machines was a winner. It meant the difference between a life of misery hacking assembler or a life of milk and honey coding in a high level language. There was no "Oh, let's be stupid and omit <safety feature du jour> from our language". It was more like "Wow, I got a compiler to run on that PDP-11/20 and it only had to be split into 5 passes to fit into core".
There were many many simple languages back then that occupied this niche. Only C has survived into the modern era (thanks to open source compilers and Unix and Microsoft's adoption of C for WindowsNT). If things had turned out differently we would be complaining about the lack of safety in code stil being written in Bliss or IMP or PL/S.
- alayne 10y agoHuh? The conclusion was "the worst aspects of UNIX and C were intention design decisions that had nothing to do with what a good, systems language should look like and everything to do with limitations of an EDSAC, PDP-7, & PDP-11."
- emptybits 10y ago> This completely misses the key factor: (most) computers were not big or fast enough to run high level languages back then. The first paragraph leads with that key factor: "Even back then, there were better languages/OS's that cheap hardware just hadn't caught up to. That cheap hardware's limitations, and them alone, drove the design decisions of BCPL, B, and then C."
- stcredzero 10y agoThis completely misses the key factor: (most) computers were not big or fast enough to run high level languages back then From the 1st paragraph, that's what I thought they were going to talk about: totally contradicts real reasons why C is designed the way it is. Even back then, there were better languages/OS's [1] that cheap hardware just hadn't caught up to. That cheap hardware's limitations, and them alone, drove the design decisions of BCPL, B, and then C. But you're right, they're mostly talking about the compilers. So anyone who could come up with a high(er) level language that would run on smaller machines was a winner. I think that's what the Objective-C folks were thinking. I guess the author would lament that they chose C as the other partner. Only C has survived into the modern era Forth was around in those days. So was Smalltalk and Lisp. So maybe, "survived as more than a niche language?" (Forth and Smalltalk are really from the 70's. You could argue that only Lisp is from "those days.")
- dalke 10y agoFortran and Cobol are still widely used.
- stcredzero 10y ago"Only Lisp" from my short list above. There are others.
- dboreham 10y agoI suppose I was thinking of the set of languages commonly used back then for programming smaller computers. Smalltalk definitely wasn't aimed at small machines. I guess I just woudln't include Forth and Lisp in that set. Not sure exactly why to be honest. Forth certainly ran on very small machines. Both were considered "weird" where I came from, but I acknowledge that isn't a universally held view ;)
- hga 10y agoLisp first ran on a vacuum tube computer, it was definitely "small", and it can certainly run fairly nicely on current "small" machines, although not "very small" like I recall of Forth. Smalltalk's machines weren't all that large by today's standards, memory was 128kB, expandable to 512kB per Wikipedia, but expansions were addressable only by bank switching. 128kB is the same memory budget as the Unix PDP-11/45's for a single process.
- nickpsecurity 10y agoDidn't know Smalltalk constraints were similar. Might have to add Smalltalk in the essay somehow. Which computer did LISP start on again?
- dalke 10y agoIBM 704 - https://en.wikipedia.org/wiki/Lisp_(programming_language)#History https://en.wikipedia.org/wiki/Lisp_(programming_language)#Hi...
- retro64 10y agoThere was no "Oh, let's be stupid and omit <safety feature du jour> from our language. Exactly. I think once you drop down into assembler it becomes very apparent what C's goal was - to standardize assembly language and make cross CPU coding easier. If you code in assembly, you eventually need to begin writing your own routines for copying, appending strings/memory, etc. It begins to look suspiciously like the stdlib as it evolves. And consequently, your code begins to look like C with assembly mixed in for the control logic. The big difference is your source only works on your target CPU. Drat.
- nickpsecurity 10y ago"Exactly. I think once you drop down into assembler it becomes very apparent what C's goal was - to standardize assembly language and make cross CPU coding easier." That's not in the docs I cited from the inventors. The original goal was ALGOL's benefits. Too hard on an EDSAC. So, chop off anything until you have fastest, most minimal language for an EDSAC. Thompson preferred BCPL over anything else at the time & wanted to do an OS in it on a PDP-7/11. Ritchie too. Mods needed to do that became the earliest C. Portability across CPU's is never mentioned. UNIX and C were specifically designed for those hardware with holdovers in there to this day. A portable, assembly language from back then that was successful was P-code. It hid CPU/architecture differences, stayed efficient, and was backend of the compiler. Later, they wrote OS's in a mix of HLL's and P-code variant. Exactly the kind of thing you do if designing for portability. C was ported because it barely had any features. These ports often had to be kludgingly forced into the machines. Quite different. "If you code in assembly, you eventually need to begin writing your own routines for copying, appending strings/memory, etc. It begins to look suspiciously like the stdlib as it evolves. And consequently, your code begins to look like C with assembly mixed in for the control logic." You might evolve a stdlib. What it looks like, how safe it is, how efficient it is, and whether it's auto-customized per CPU via macros, etc are totally different depending on your foundation. Most of Oberon System's OS is done like you would ordinary programs with function calls, type-checked arguments, and even garbage collection in later ones. The LISP machines were incredibly different with one able to use macros for API's or bottom layers. The Smalltalk approach was more high-level than most 3GL's with its OOP philosophy. House hid what little unsafe stuff it had in the H-Layer with rest of OS coded in Haskell with type-system & functional benefits. So, C's style is neither inevitable nor the best. It was a byproduct of its inventors development style on two, specific machines starting with a typeless, low-level language designed for a worse machine. On other extreme, today there's people coding OS kernels, drivers, etc in theorem provers that automatically extract code in C or assembly with safety and/or termination proofs. The only C compiler, CompCert, that passed fuzz testing bug-free in middle-end used such a method whereas those written in C had tons of bugs despite years of bug-hunting. Drat.
- nickpsecurity 10y ago" If things had turned out differently we would be complaining about the lack of safety in code stil being written in Bliss or IMP or PL/S. " Quite selective. The obvious counterpoint, which next version of essay will utilize, would be Wirth and Jurg's work in Lilith system. Two pro's + 8 part-timers, two years, plenty constraints, and whole system from HW to OS to apps to do with Pascal philosophy (balancing safety/speed/maintenance). To keep apples to apples, let's focus on language design the main two went with: the Modula-2 language. It's very simple, compiles faster than C due to cleaner grammar, is safe-by-default in a few ways, lets you turn that off where necessary, modular, supported concurrency, and runs fast. This approach got repeatedly iterated into progressively safer and faster systems by amateurs & pro's alike, sometimes just 1-2 students, that crashed less than C apps. Best part relevant to your comment: they built first Modula-2 compiler on a PDP-11. :P Most of C's advantages, a few more on top of it, fewer problems, and developed on same architecture. Sounds like a clear winner from design standpoint. If you want simpler & faster, the Edison system is a good, extreme example of how ALGOL practitioner might do a C-like project. Too simple vs Modula-2 imho but beats C at its own game of fast minimalism with some Wirth-style benefits. Whole system, with source, got published in one paper. http://modula-2.info/m2info/pmwiki.php/General/FAQ http://modula-2.info/m2info/pmwiki.php/General/FAQ https://en.wikipedia.org/wiki/Modula-2 https://en.wikipedia.org/wiki/Modula-2 http://brinch-hansen.net/papers/1981b.pdf http://brinch-hansen.net/papers/1981b.pdf
- AnimalMuppet 10y agoOK, Lilith took less time to write, and it was (also) on crummy hardware. Was it as useful as Unix was in production? Lilith never really took off. Either it wasn't as capable as alternatives, or it was marketed badly. My money is on "not as actually useful as theory predicted", though I have no evidence. I note that Borland brought out a Turbo Pascal to go with Turbo C (fixing some of Pascal's shortcomings in the process), but never bothered with a Turbo Modula-2. If Modula-2 was better than Pascal, why not? (And, since the initial article seemed to be a fan of Algol, why didn't Borland do a Turbo Algol?) Microsoft had their Microsoft C that competed with Borland, but didn't bother to do a Microsoft Pascal. Why not? Because nobody cared about Modula-2, and not enough people cared about Pascal. And why was that? Because in practice, it was easier to write software in C than in Modula-2, or even than in Pascal. You're idealizing dead languages. They're dead for a reason, and it's not just historical accident. In the real world, they were harder to use than the languages that theory said should be the best.