3 ms·
A number of languages most naturally live in the Domain-Specific Language (DSL) world, and only left it because, through some period of history, some groups did
by msla 9y ago
A number of languages most naturally live in the Domain-Specific Language (DSL) world, and only left it because, through some period of history, some groups didn't have much else. Fortran was a general-purpose language for a while, because it was the only language other than BASIC or assembly available at some sites, and it got roped into doing precisely the kind of text-manipulation stuff it's historically been bad at. If someone is writing a text adventure in Fortran, you know they don't have any other option.
Cobol is a DSL for record-oriented batch processing, which is extremely useful for some business tasks and not very useful for most of the rest of the programming world. RPG (Report Program Generator) is, if anything, even more restricted than Cobol, but it never "escaped" to the extent Cobol did so it never got the same kind of derision heaped upon it.
C is most naturally a DSL for OSes and what used to be called "systems programming": Software that has to run at machine speed, and can sacrifice usability and debuggability for pure speed. It was never a good choice for most of what got written in it, but, again, C compilers were available when other development tools were not, and, on a slow enough computer, all programming becomes "systems programming".
- walshemj 9y agoRATFOR was always an interesting way of doing text with Fortran. It was a pre-processor for Fortran 66 written by Brian Kernighan
- deleted 9y ago[deleted]
- pjmlp 9y agoC compilers only became generally available outside expensive UNIX workstations around the mid-80's, until then there were dialects like Small-C for CP/M systems, where C was just yet another language. Systems programming languages exist since at least 1961, with ESPOL being one of the first ones. IBM for example did their RISC research with PL/8. As for pure speed, that is the result of 40 years research in taking advantage of UB. "Oh, it was quite a while ago. I kind of stopped when C came out. That was a big blow. We were making so much good progress on optimizations and transformations. We were getting rid of just one nice problem after another. When C came out, at one of the SIGPLAN compiler conferences, there was a debate between Steve Johnson from Bell Labs, who was supporting C, and one of our people, Bill Harrison, who was working on a project that I had at that time supporting automatic optimization...The nubbin of the debate was Steve's defense of not having to build optimizers anymore because the programmer would take care of it. That it was really a programmer's issue.... Seibel: Do you think C is a reasonable language if they had restricted its use to operating-system kernels? Allen: Oh, yeah. That would have been fine. And, in fact, you need to have something like that, something where experts can really fine-tune without big bottlenecks because those are key problems to solve. By 1960, we had a long list of amazing languages: Lisp, APL, Fortran, COBOL, Algol 60. These are higher-level than C. We have seriously regressed, since C developed. C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine. This is one of the reasons compilers are ... basically not taught much anymore in the colleges and universities." Fran Allen interview, Excerpted from: Peter Seibel. Coders at Work: Reflections on the Craft of Programming