What makes language design successful? This is the question that Brian Kernighan, among the contributors to the development of Unix and father of Awk, tries to answer in a talk at the University of Nottingham.
For his talk, Kernighan focuses on domain-specific languages, i.e. languages that are designed to solve a specific problem associated to a given application. They are usually “little” languages that have a narrow domain of applicablity and are not necessarily Turing-complete. What makes them interesting for Kernighan is that they provide a much more accessible playground for language design and language designers than complex languages, such as C++ and others. Examples of successful domain-specific languages are regular expressions, shell, Awk, XML, HTML, SQL, R, etc.
The notation that a language provides is a fundamental part of its design. Notation will make the difference between a language that allows developers to solve a problem with almost no effort and a language that will make it a hard task (and that can be better at other kinds of problems). Moreover, Kernighan says, a language’s notation will affect the way we think about a problem.
The first example of language that Kernighan analyzes is Awk, which uses a pattern-action paradigm to specify what is to be done. This choice was motivated by Awk’s design goal to make it simple to write 1-liners, and although Awk can be “abused” to write really long programs, it is most effective for short programs. Another feature of Awk’s notation was its similarity to C, which is according to Kernighan an important advantage so people do not have to learn something new.