Alfred Aho on the origins of awk (2008)

From an interview by Naomi Hamilton:

Language design is a very personal activity and each person brings to a language the classes of problems that they’d like to solve, and the manner in which they’d like them to be solved. I had a lot of fun creating AWK, and working with Kernighan and Weinberger was one of the most stimulating experiences of my career. I also learned I would not want to get into a programming contest with either of them however! Their programming abilities are formidable.

Interestingly, we did not intend the language to be used except by the three of us. But very quickly we discovered lots of other people had the need for the routine kind of data processing that AWK was good for. People didn’t want to write hundred-line C programs to do data processing that could be done with a few lines of AWK, so lots of people started using AWK.

[The name] was not our choice. When our research colleagues saw the three of us in one or another’s office, they’d walk by the open door and say ‘AWK! AWK!’. So, we called the language AWK because of the good natured ribbing we received from our colleagues. We also thought it was a great name, and we put the AUK bird picture on the AWK book when we published it.

What AWK represents is a beautiful marriage of theory and practice. The best engineering is often built on top of a sound scientific foundation. In AWK we have taken expressive notations and efficient algorithms founded in computer science and engineered them to run well in practice.

Alfred Aho, interviewed by Naomi Hamilton, “The A-Z of Programming Languages: AWK”, Computer World, 20080527, accessed 20111029.

Brian Kernighan’s summary thoughts on scripting languages

  • people use tools in unexpected, perverse ways
    • compiler writing
    • implementing languages
    • object language
    • first programming language
  • the existence of a language encourages programs to generate it
    • machine generated inputs stress a program differently than people do
  • mistakes are inevitable and hard to change
    • function syntax
    • concatenation syntax
    • ambiguities, especially with >
    • difficulty of changing a “standard”
    • creeping featurism from user pressures
  • standardization is hard
    • there is a POSIX standard for Awk
    • awk, gawk, mawk, tawk, busybox awk, … all differ in places
  • internationalization is hard
    • $1 ~ /[全一旅]/ { … }

Brian Kernighan, “Random thoughts on scripting languages”, guest lecture in course CS152, David F. Bacon, Spring, 2009, Harvard University. http://www.eecs.harvard.edu/cs152/lectures/CS152-Lecture_14-Kernighan.pdf

Against object-oriented design (except in scripting languages)

In my opinion, objects provide only a modest benefit: perhaps a 20 to 30 percent improvement in productivity but certainly not a factor of two, let alone a factor of 10. … OO programming does not provide a large improvement in productivity because it neither raises the level of programming nor encourages reuse. … The strong typing of most OO languages encourages narrowly defined packages that are hard to reuse.

… Another problem with OO languages is their emphasis on inheritance. Implementation inheritance, in which one class borrows code that was written for another class, is a bad idea that makes software harder to manage and reuse. … [It] causes the same intertwining and brittleness that have been observed when goto statements are overused. As a result, OO systems often suffer from complexity and lack of reuse.

Scripting languages, on the other hand, have actually generated significant software reuse.

… Nonetheless OO programming does provide at least two useful features. The first is encapsulation: objects combine data and code in a way that hides implementation details. This makes it easier to manage large systems. The second useful feature is interface inheritance, where classes provide the same methods and application programming interfaces (APIs) even though they have different implementations. This makes the classes interchangeable and encourages reuse.

Fortunately, the benefits of objects can be achieved in scripting languages as well as system programming languages … for example, Python is an OO scripting language.

John K. Ousterhout, “Scripting: Higher-Level Programming for the 21st Century,” (IEEE Computer, 31/3: 23–30), pp. 29-30. http://www.stanford.edu/~ouster/cgi-bin/papers/scripting.pdf

The Internet and scripting languages

The Internet is nothing more than a gluing tool. It does not create any new computations or data; it simply makes a huge number of existing things easily accessible. The ideal language for most Internet programming tasks is one that makes it possible for all the connected components to work together; that is, a scripting language.

John K. Ousterhout, “Scripting: Higher-Level Programming for the 21st Century,” (IEEE Computer, 31/3: 23–30), p. 28. http://www.stanford.edu/~ouster/cgi-bin/papers/scripting.pdf