Bernie Cosell
558
It has been such a boon in systems programming. The idea that we would
write our systems in assembler and all our applications in Pascal sent shivers
down my spine. I don’t think that was the right answer. But writing both
systems and applications in C, I would have to say has proven just not to
work very well. It’s just too hard.
It’s kind of like the problems we had with interrupt bugs. You could argue
that there’s no real magic in writing a program with sequence breaks or
interrupts. There’s no real problem with that. It takes a little bit of
understanding and a little bit of care. But I know for a fact that very good
programmers who understand all of that put those bugs in their
programmer. A programmer like me would have to come and fix it and I
had to do the Niklaus Wirth–style thing of inventing the computer language
that wouldn’t let them make interrupt bugs.
For the IMP system I wrote a complicated set of assembler macros, so you
could declare what you were doing. When you came in on an interrupt, you
wrote a declaration that says, “I am on modem input” or “I am on the high-
priority clock or the low-priority clock.” And then when it assembled your
program, it actually tagged every instruction with which interrupt level it
was running on and then there was a postprocessor that I probably wrote in
TECO macros, honest to God, that processed that and looked for time-
sharing problems. It would look for a variable that was accessed by two
different levels and it would say, “There is an interrupt conflict.” Now all of
a sudden, the time-sharing bug would go away. Other programmers could
understand that if they put the right declarations in, these macros would
keep them from making timing bugs. I got a trip to Hungary to present how
you could get programmers who don’t really understand real-time issues to
be able to write solid real-time programs by using this technique to abstract
out the conflict problems.
That’s a little bit the way I feel about C. I’m sure that there are good
programmers, perhaps including me, who can write good C programs. But
it’s just harder than it has to be. In the modern environment it’s gotten
harder because the environment is so much more difficult—the number of
places where C’s weaknesses can be exploited or overlooked, the amount
of care it takes. That’s one reason why I’m very comfortable writing in Perl.
Perl is slow. I’m sure it’s one of the slower languages, but in essence it