5 ms·
> C was good for its time. Go ahead, take a look at PL/I and BLISS. See whether you'd rather program in those. I don't think that's a fair comment. Pl/I wasn't
by laumars 7y ago
> C was good for its time. Go ahead, take a look at PL/I and BLISS. See whether you'd rather program in those.
I don't think that's a fair comment. Pl/I wasn't really the same domain as C and there were other alternatives to PL/I (such as FORTRAN, COBOL, ALGOL, Simula, LISP etc)
In fact by the time C was released, there were already literally dozens of programming languages. And C itself an evolutionary progression because it took ideas from B, ALBOL and a few others. Also Pascal pre-dates C as well.
I don't mean the following as a criticism against C because I do quite like the language but it does sometimes feel like it's put on a pedestal because it ended up dominating the industry -- either directly or via other languages heavily inspired by C. I do wonder if we've be seeing the same rose-tinted comments had UNIX been based on Pascal and Object Pascal not lost to C++.
- notacoward 7y ago> by the time C was released, there were already literally dozens of programming languages Hundreds, actually, I was there, but writing a compiler in COBOL or an OS kernel in FORTRAN would have been quite an exercise. For those kinds of domains, there were few alternatives and assembler was still a common choice. C was certainly an improvement on that.
- mark-r 7y agoPascal was my favorite language for a number of years. But it was completely inappropriate for systems programming because it was too protective, it kept you from doing the things that are regularly required at an OS level.
- laumars 7y ago> Pascal was my favorite language for a number of years. Likewise :) > But it was completely inappropriate for systems programming because it was too protective, it kept you from doing the things that are regularly required at an OS level. I guess it depends on what systems you're programming. I seem to recall Pascal was heavily used in the early days of Windows and Macintoshes. Albeit my memory is hazy so perhaps that was "just" user applications with the lower level stuff being done in assembly?
- notacoward 7y agoI started my professional programming career working in Pascal on the Mac. I clearly recall having to write one piece (a MIDI driver) in assembly. I have fuzzier memories of the interfaces using a rather explicitly Pascal-based string format and stack calling convention, and MPW was also Pascal-oriented rather than C-oriented, so I suspect that at least some of the system software was written in Pascal. OTOH, I'm pretty sure I recall hearing that practically all of what Atkinson and Hirschfeld and Capps and so on wrote for the original ROMs was in assembly (as distinct from what had been done on the LISA) because that was the only way it would fit.
- mark-r 7y agoThe Pascal and C calling conventions were different in the way the stack got cleaned after a function call, and Pascal turned out to be ever so slightly faster. So the OS functions used that as the standard. Microsoft had a keyword that could be applied to any function in C to make it compatible. Assembly sounds very believable for early OS work.
- mark-r 7y agoMost of my experience was user applications. Wirth later created the Oberon system completely in Modula, which was basically Pascal++. So maybe it was closer to suitable than I remember.