Preface

I’ve been explaining what’s now the Wolfram Language to people for more than 25 years, and I finally decided it was time to take what I’d learned and write a minimal introduction that people could read on their own. This book is the result of that effort.

When we first launched Mathematica—the precursor of the Wolfram Language—in 1988, I published a book that provided both a tutorial introduction and reference guide to the system. The book was very popular and I think contributed substantially to the early success of Mathematica. Over the next decade or so,

*The Mathematica Book*, as it came to be known, went through five editions, and steadily grew until it was nearly 1500 pages long.My goal in

*The Mathematica Book*was to systematically cover all aspects of the system. But when we released a huge new version in 2007, it became clear that this was simply no longer possible in a single book. Our online documentation had meanwhile steadily grown, and in 2007, with the introduction of a vast number of new examples, it reached the point where a printed version would have been well over 10,000 pages in length.In 2009 Wolfram|Alpha arrived, with its natural-language interface specifically built for use without explanation or documentation. But then, emerging from Mathematica and Wolfram|Alpha, came the Wolfram Language, and there was once again a need for both explanation and documentation.

I believe that the online documentation for the Wolfram Language—which in printed form would exceed 50,000 pages—does very well at explaining the specifics of how to use all the many capabilities of the system. But particularly for newcomers there’s also a need to understand the principles of the language—that I’ve worked so hard over the years to keep coherent and consistent.

The Wolfram Language is unique among programming languages, and different in many ways. But some time ago, I wrote a Fast Introduction for Programmers that in about 30 pages gives modern programmers at least a basic grounding in the principles of the Wolfram Language.

But what about people who don’t already know programming? The Wolfram Language provides a unique opportunity not only to introduce anyone to programming, but to get them quickly to the very frontiers of what can be done with computation today.

That this is possible is a consequence of all the effort we’ve put into creating the technology of the Wolfram Language over the course of nearly three decades. My goal has been to build a language where anyone can specify as simply as possible what they want to do, then inside, all the details are automatically taken care of to get it done.

So how should people learn the Wolfram Language? One approach is immersion: Be in an environment where the Wolfram Language is used. Explore programs that run, and learn from them as examples. In my observation, this can work very well so long as there is at least occasionally someone around to explain principles and help with issues when they come up.

But what about learning the Wolfram Language entirely on one’s own? Here I think what’s needed is a systematic introduction that progressively builds from one concept to another, answering every obvious question as it goes. And that’s what I’m trying to do in this book.

Learning the Wolfram Language is a bit like learning a human language. There’s a mixture of vocabulary and principles, that have to be learned hand in hand. The Wolfram Language is immensely more systematic than human languages—with nothing like irregular verbs to memorize—but still has the same kind of progression towards fluency that comes with more and more practice.

I wondered how to write this book. And eventually I decided to base it loosely on Latin textbooks, of the kind I used when I was a kid. Unlike living languages, Latin cannot be learned by immersion, and so there is no choice but to build step by step, as I do in this book.

In some ways learning programming is a bit like learning mathematics. Both have a certain precision: things are either right or wrong. But with the Wolfram Language, programming is much more concrete: At every step you can see what is happening, and whether what you’re doing is right. There are no hidden concepts that have to be explained abstractly from outside and cannot explicitly be seen.

Still, there’ve been two millennia of development in the teaching of mathematics, that have progressively optimized the sequence of presenting arithmetic, algebra and so on. The problem of teaching the Wolfram Language is something completely new, where everything has to be figured out from scratch. Existing programming education isn’t much help, because so much of it is about just the kinds of lower-level structure that have been automated away in the Wolfram Language.

I view this book as an experiment: an attempt to provide a particular path through learning the Wolfram Language. I am not trying to cover everything in the language, not least because that would take at least 50,000 pages. Instead, I am trying to explain the principles of the language through a limited number of specific examples.

I’ve chosen the examples to be interesting and useful in practice. But the bigger point is that through the examples, I cover most of the core principles of the language. And knowing these principles, you’ll be ready to go to specific documentation to understand any particular aspect of what the language can do.

Needless to say, the Wolfram Language has many sophisticated capabilities. Some of them—like identifying objects in images—are sophisticated on the inside, but easy to explain. But others—like computing Gröbner bases—are also sophisticated to explain, and may require significant outside knowledge of mathematics or computer science.

This is certainly not the only elementary introduction to the Wolfram Language that could be written, and I hope there will be many more. It follows a specific—and in many ways arbitrary—path through the vast capabilities of the language, highlighting certain features but not even mentioning many other equally deserving ones.

Still, I hope that the power and beauty of the language that I have nurtured for more than half my life will shine through, and that many students and other people, with many diverse backgrounds, can use this book to get started with the Wolfram Language and get involved with the kind of computational thinking that is quickly becoming a defining feature of our times.

Stephen Wolfram