Programming language design is a serious business. Small errors in a language design can be conducive to large errors in an actual program written in the language, and even small errors in programs can have large and extremely costly consequences. The vulnerabilities of widely used software have repeatedly allowed attack by malware to cause billions of dollars of damage to the world economy. The safety and security of programming languages is a recurrent theme of this book.
Programming language design is an unpredictable adventure. Languages designed for universal application, even when supported and sponsored by vast organisations, end up sometimes in just a niche market. In contrast, languages designed for limited or local use can win a broad clientele, sometimes in environments and for applications that their designers never dreamed of. This book concentrates on languages of the latter kind.
These successful languages share a significant characteristic: each of them is the brainchild of a single person or a small team of like-minded enthusiasts. Their designers are masterminds of programming; they have the experience, the vision, the energy, the persistence, and the sheer genius to drive the language through its initial implementation, through its evolution in the light of experience, and through its standardisation by usage (de facto) and by committee (de jure).
In this book the reader will meet this collection of masterminds in person. Each of them has granted an extended interview, telling the story of his language and the factors that lie behind its success. The combined role of good decisions and good luck is frankly acknowledged. And finally, the publication of the actual words spoken in the interview gives an insight into the personality and motivations of the designer, which is as fascinating as the language design itself.
Preface
WRITING SOFTWARE IS HARDAT LEAST, WRITING SOFTWARE THAT STANDS UP UNDER TESTS, TIME , and different environments is hard. Not only has the software engineering field struggled to make writing software easier over the past five decades, but languages have been designed to make it easier. But what makes it hard in the first place?
Most of the books and the papers that claim to address this problem talk about architecture, requirements, and similar topics that focus on the software . What if the hard part was in the writing ? To put it another way, what if we saw our jobs as programmers more in terms of communication language and less in terms of engineering?
Children learn to talk in their first years of life, and we start teaching them how to read and write when they are five or six years old. I don't know any great writer who learned to read and write as an adult. Do you know any great programmer who learned to program late in life?
And if children can learn foreign languages much more easily than adults, what does this tell us about learning to programan activity involving a new language?
Imagine that you are studying a foreign language and you don't know the name of an object. You can describe it with the words that you know, hoping someone will understand what you mean. Isn't this what we do every day with software? We describe the object we have in our mind with a programming language, hoping the description will be clear enough to the compiler or interpreter. If something doesn't work, we bring up the picture again in our mind and try to understand what we missed or misdescribed.
With these questions in mind, I chose to launch a series of investigations into why a programming language is created, how it's technically developed, how it's taught and learned, and how it evolves over time.
Shane and I had the great privilege to let 27 great designers guide us through our journey, so that we have been able to collect their wisdom and experience for you.
In Masterminds of Programming , you will discover some of the thinking and steps needed to build a successful language, what makes it popular, and how to approach the current problems that its programmers are facing. So if you want to learn more about successful programming language design, this book surely can help you.
If you are looking for inspiring thoughts regarding software and programming languages, you will need a highlighter, or maybe two, because I promise that you will find plenty of them throughout these pages.
Federico Biancuzzi
Organization of the Material
The chapters in this book are ordered to provide a varied and provocative perspective as you travel through it. Savor the interviews and return often.
Chapter 1, C++ , interviews Bjarne Stroustrup.
Chapter 2, Python , interviews Guido van Rossum.
Chapter 3, APL , interviews Adin D. Falkoff.
Chapter 4, Forth , interviews Charles H. Moore.
Chapter 5, BASIC , interviews Thomas E. Kurtz.
Chapter 6, AWK , interviews Alfred Aho, Peter Weinberger, and Brian Kernighan.
Chapter 7, Lua , interviews Luiz Henrique de Figueiredo and Roberto Ierusalimschy.
Chapter 8, Haskell , interviews Simon Peyton Jones, Paul Hudak, Philip Wadler, and John Hughes.
Chapter 9, ML , interviews Robin Milner.
Chapter 10, SQL , interviews Don Chamberlin.