3 ms·
I'm not mistaken, only you appear not to have experience with FORTRAN and Pascal. > There was no such thing as a general-purpose program that was both portable
by acqq 15y ago
I'm not mistaken, only you appear not to have experience with FORTRAN and Pascal.
> There was no such thing as a general-purpose program that was both portable across a variety of hardware and also efficient enough to compete with custom code written for just that hardware.
Of course ALGOL easily matches this claim. Proof: Knuth's TeX was written in Pascal.
Not to mention everything that was written in FORTRAN.
> I still occasionally run programs originally written in 1981 for a single-processor 16-bit PDP-11 with 64k of RAM per program, and they're still efficient
Try to check when most of the FORTRAN libraries still used today were written. Some -- decades before 1980.
See also how long FORTRAN compilers generated faster scientific code than C -- for decades after C appeared. You can also find why:
http://en.wikipedia.org/wiki/Pointer_aliasing http://en.wikipedia.org/wiki/Pointer_aliasing
> "Why Pascal is Not My Favorite Programming Language"
The paper, as far as I remember, doesn't claim impossibility of writing useful software, mainly laments for the lack of return, break, continue constructs, which are convenient to have but not real show-stoppers. Note also that Pascal standard features are just to be a "learner's language" not a "system language" -- for which there were working compilers and uses before C.
> You couldn't run the Burroughs 5000 Master Control Program on a PDP-11, as far as I know, at all, and certainly not efficiently.
You'd also have to port Unix the same way you had to port MCP -- you can think of MCP as Unix in which drivers are part of the kernel -- but "integer" in ALGOL is certainly as portable as "int" in Unix -- they both fit the "hardware word."
Nicer pointer arithmetics in C is a good point. Though note that Wirth also had "Pascal lite" with pointers and which was closer to assembly for OS-level stuff just as Burroughs had ALGOL lite for OS-level stuff. The concepts of "closer to assembly" but higher-level languages existed certainly well before C. The idea to separate kernel and drivers is something else, and I don't know who achieved that first and when.
Finally, see Google's go -- it's more or less acceptance of Wirth's directions, mixed with terser notation of C. (Now, finally, why are you still on my lawn?)
> The C abstract model of computation is an increasingly poor fit to modern hardware
No, you can observe C (as well as more or less all ALGOL descendants) as a higher level representation acceptably close to assembly, so as long as there are CPU's which execute machine code and we need to care about details (see http://news.ycombinator.com/item?id=3068513 http://news.ycombinator.com/item?id=3068513) we'll need something like that to have efficient and not too low level representation.
- kragen 15y ago(Note: I continued writing my original comment after you posted yours.) I don't have much experience with Fortran and Pascal. But the original article also talks about how C was different from Fortran: "Fortran did okay for array-oriented number-crunching code, but nobody could do it for general-purpose code such as what you’d use to build just about anything down to, oh, say, an operating system." And that covers most of the FORTRAN libraries still used today. Both Fortran and Pascal came close — ADVENTURE may be one of Fortran's greatest triumphs — but they were not really usable by themselves. Software Tools was written in Ratfor (as I said, C's sibling) and TeX was written in WEB, rather than Pascal. (Writing a text-processing program in a strongly-typed language without a string type is an exercise in frustration.) > you can think of MCP as Unix in which drivers are part of the kernel I'm not sure what you're trying to say here. Drivers are part of the kernel in Unix too. > but "integer" in ALGOL is certainly as portable as "int" in Unix -- they both fit the "hardware word." But ALGOL-60 doesn't have bitwise operations, bit shifts, unsigned arithmetic, char, or more than one precision of floating-point. Instead you get ↑, exponentiation. So many algorithms that can be expressed efficiently in C cannot be expressed efficiently in ALGOL-60. > Wirth also had "Pascal lite" with pointers Where can I learn more? Googling [Pascal lite] is not helpful. > The concepts of "closer to assembly" but higher-level languages existed certainly well before C. Certainly true — BCPL could be described as one of them. But BCPL didn't quite get it right. > Finally, see Google's go -- it's more or less acceptance of Wirth's directions What does Golang have in common with Oberon (?) that it doesn't have with C? ๛
- acqq 15y ago> What does Golang have in common with Oberon (?) that it doesn't have with C? http://en.wikipedia.org/wiki/Oberon_(programming_language) http://en.wikipedia.org/wiki/Oberon_(programming_language) A lot! Garbage collection, no unsafe pointer arithmetic, type specification different from variable use (varname: type) > ALGOL-60 doesn't have bitwise operations Ah.... That's like saying that Unix IV didn't have driver for your network card. It was just not standard only because CPU instruction sets were not standard enough. Real-life compilers had it: http://rosettacode.org/wiki/Bitwise_operations#ALGOL_68 http://rosettacode.org/wiki/Bitwise_operations#ALGOL_68 > more than one precision of floating-point FORTRAN had it, C didn't care initially. And FORTRAN remained faster for long. > Where can I learn more? Actually, my bad, sorry, "lite" "closer to the system" language was even before Pascal and obviously before C, it was a bootstrap language for ALGOL W in sixties, see sources: http://bitsavers.org/pdf/stanford/listing/Algol_W_Listing_Nov69.pdf http://bitsavers.org/pdf/stanford/listing/Algol_W_Listing_No... And then Pascal was also written in Pascal after it was bootstrapped once.